springboot (3) 썸네일형 리스트형 스프링 AOP 구현하기 - 1 (@Aspect, @Around, @Pointcut) 스프링 AOP를 구현하는 기본 코드입니다. 총 2개 포스팅으로 작성하였습니다.build.gradle스프링 AOP 기능을 구현하기 위해서 아래 dependency 들로 구성하였습니다.dependencies { implementation 'org.springframework.boot:spring-boot-starter' // Spring aop 사용을 위한 dependency implementation 'org.springframework.boot:spring-boot-starter-aop' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springfra.. 스프링 AOP 구현하기 - 2 (포인트컷 분리, @Order) https://silver-programmer.tistory.com/entry/%EC%8A%A4%ED%94%84%EB%A7%81-AOP-%EA%B5%AC%ED%98%84%ED%95%98%EA%B8%B0-1 위 포스팅에 이어서 작성하는 AOP 구현하기 2편입니다. 이번 포스팅에는 아래와 같은 내용을 정리하였습니다.포인트컷을 분리하여 외부에서 어떻게 참조할 수 있는지Advice 적용 순서를 어떻게 바꿀 수 있는지스프링 AOP 구현 - 3 (Pointcut 참조)포인트컷을 공용으로 사용하기 위해 별도의 외부 클래스에 모아둘 수 있습니다. 외부에서 호출할 때는 포인트컷의 접근 제어자를 public으로 설정합니다!package hello.aop.order.aop;import org.aspectj.lang.anno.. [DB] @Transactional 이란? 해당 포스팅에서 트랜잭션 매니저를 이용해서 아래처럼 트랜잭션을 직접 시작할 수 있었습니다. public void transferMoney(String fromId, String toId, int money) { // 트랜잭션 시작 TransactionStatus status = transactionManager.getTransaction(new DefaultTransactionDefinition()); try { // 비즈니스 로직 businessLogic(fromId, toId, money); transactionManager.commit(status); //성공시 커밋 } catch (E.. 이전 1 다음