본문 바로가기

2018/11

(2)
Spring AOP 스프링이 해줄건데 너가 왜 어려워 해? Spring boot에서 aop logging 사용법 제일 쉽게 알려드립니다! Spring AOP (Aspect Oriented Programming) - AOP는 관점 지향 프로그래밍으로 "기능을 핵심 비즈니스 기능과 공통 기능으로 '구분'하고, 공통 기능을 개발자의 코드 밖에서 필요한 시점에 적용하는 프로그래밍 방법"이다.위의 한 줄만 기억하면 된다.초보에게 Aspect, Advice, Pointcut, Weaving, Joinpoint, ... 이런거는 AOP를 이해하는데 방해하는 요소일 뿐이다. 추후에 AOP에 대해서 활용하고 싶고 깊이있게 이해하고 싶을 때 위에 나열한 것들에 대해서 공부해본다.스프링부트에서 초간단 AOP 적용하는 법 3단계1. spring-boot-starter-aop dependency 적용하기라이브러리는 있어야지.1234 org.springframew..
3가지만 기억하자. 스프링 부트 초간단 캐시 @EnableCaching, @Cacheable, @CacheEvict (spring boot cache example) 스프링 부트 캐시 적용하는 가장 쉬운 방법 스프링 부트에 캐시를 적용하고 싶으면 3가지만 기억하면 된다.@EnableCaching, @Cacheable, @CacheEvict1. "spring-boot-starter-cache" 라이브러리 불러온다.1234 org.springframework.boot spring-boot-starter-cacheColored by Color Scripter 2. 캐시 기능을 사용하고 싶은 프로젝트에 @EnableCaching을 쓴다.1234567@EnableCaching@SpringBootApplicationpublic class DemoApplication { public static void main(String[] args) { SpringApplication.ru..