본문 바로가기
반응형

SpringBoot4

Spring Boot에서 Redis를 기본적인 Cache(spring-boot-starter-cache)로 사용하기 의존성 org.springframework.boot spring-boot-starter-data-redis Spring-boot-starter-web 혹은 spring-boot-starter-data-redis을 받으면 Spring-boot-starter-cache에 대한 의존성을 모두 포함하여 받을 수있다. 설정 spring.cache.type: redis spring.redis: host: localhost port: 6379 캐시 사용 기본 사용은 ConcurrentMapCacheManager가 등록되며 인메모리 ConcurrentHashMap으로 캐시 역할을 수행하는 듯 보인다. @Cacheable : 캐시 있으면 가져오고, 없으면 등록 @CachePut : 무조건 등록 // SpEl 문법 사용가.. 2021. 8. 2.
Logback Logback 위치 기본 스프링 : /resources/logback.mxl 부트 : /resources/logback-spring.xml .yml파일에서 설정가능 (profile에 따른 설정도 가능.) 레벨 TRACE 로그의 상태 메시지 출력 packagingData="true" ->.. 2021. 5. 25.
SpringBoot 참고 : https://velog.io/@max9106/Spring-Boot-SpringApplication- spring boot 란? 독립적인 app 빠르고 쉽게 만들수있게 해준다. 일반적인 설정 제공(tomcat 등) + 버전 ->> 커스텀가능 xml 설정 X, code generation X 설정 spring-boot-starter-parent -> 상속받은 많은 의존성 등록, 버전관리, 기본설정(리소스필터링, 플러그인설정) spring-boot-starter-web spring-boot-maven-plugin -> build시 실행 가능한 jar파일로 구조를 변경 Main-Class, Start-Class, Spring-Boot-Classes, Spring-Boot-Lib 통해 @SpringBo.. 2021. 2. 9.
SPRING SECURITY SPRING SECURITY DispatcherServlet 받기 이전에 ServletFilter를 통해 인증/인가 처리. (ServletFilter는 WAS담당이지만 DelegatingFilterProxy를 boot에서 SecurityFilterAutoConfiguration 설정하여서 서블릿에 등록, 요청이 오면 FilterChainProxy(스프링 필터)에게 위임) 필터를 통한 접근제어 프레임웤 용어 인증(Authentication) : 로그인 인가(Authorization) : 권한확인 AuthenticationFilter - 로그인url 감시 -> AuthenticationManager인증 -> 성공이면 Authentication를 SecurityContextHolder에 저장 Authentic.. 2021. 2. 9.
728x90
반응형