반응형

Import

    Typescript 헷갈리는 부분 정리

    Any vs Object vs Unknown - typescript에서 모든 타입은 any type의 서브 타입들이다. 그래서 어떠한 제약도 없는 모든 타입을 받아서 사용할 수 있다. - object non privitive type으로 undefined, string, boolean, symbol같은 primitive type을 허용하지 않는다. 대신 null은 허용된다. (null은 태생이 object) - unknown 타입은 any 타입처럼 어떤값도 넣을 수 있다. 하지만 ts compiler는 unknown 타입에 대한 어떤 오퍼레이션도 허용하지 않는다. 게다가 unknown 타입은 오직 any 타입만 할당 할 수있다. 자료형 캐스팅 방법 - let strLength: number = (some..

    스프링 CacheManager Ehcache

    스프링에는 데이터를 캐시로 보관할 수 있는 캐시 기능을 제공한다. 그 중 대표적으로 사용되는 Ehcache(ehcache-spring-annotation)에 대해 알아보자. 이를 사용하는 가장 대표적인 이유는 다음과 같다. 1. 꾸준하게 동일한 데이터 2. 조회하여 데이터를 가지고 오는데 비용이 많이 소모되는 경우 [설정방법] pom.xml 123456net.sf.ehcacheehcache2.10.4Colored by Color Scriptercs applicationContext.xml 수정 applicationContext-cache.xml 추가 1234567891011121314151617181920212223 Colored by Color Scriptercs Ehcache 설정 파일 생성12345..

반응형