스프링 3

스프링 핵심기술 06. AOP

이제 스프링 AOP에 대해 알아보자. AOP란 Aspect-Oriented Programming으로 흩어진 Aspect들을 모듈화하는 프로그래밍 기법을 말한다. 자바에서는 AspectJ나 스프링AOP를 통해 구현하며, 컴파일시점 / 로드타임 / 런타임에 AOP를 적용시킬 수 있다. AOP 관련 개념이 잘 설명된 포스팅을 좀 찾아보았다. https://tecoble.techcourse.co.kr/post/2021-06-25-aop-transaction/ AOP 입문자를 위한 개념 이해하기 이 글은 AOP 개념이 생소한 입문자들을 위한 포스팅입니다. 1. OOP의 한계 image… tecoble.techcourse.co.kr https://atoz-develop.tistory.com/entry/Spring-..

Study/Spring 2022.02.13

스프링 핵심기술 05. 추상화

스프링이 제공하는 추상화 기술에 대해 알아보자. 순서는 다음과 같다. Resource 추상화 Validation 추상화 Data Binding 추상화 1. Resource 추상화 Resource 추상화란 무엇인가? java.net.URL이라는 클래스를 Spring.core.io.resource라는 클래스로 감싸서 Low-level에 있는 리소스에 접근하는 기능이다. (java.net.URL을 classpath기준으로가져오기 위해서) @Override public void run(ApplicationArguments args) throws Exception { Resource resource = resourceLoader.getResource("classpath:test.txt"); // #1. Resou..

Study/Spring 2022.02.13

스프링 핵심기술 04. ApplicationContext가 상속받는 인터페이스들

ApplicationContext는 Bean Factory의 역할 + Spring의 여러가지 기능들을 담당하고 있다. 이 ApplicationContext는 다음과 같은 인터페이스들을 상속받고 있는데 ApplicationEventPublisher EnvironmentCapable HierarchicalBeanFactory ListableBeanFactory MessageSource ResourceLoader ResourcePatternResolver 이들 중 가장 먼저 살펴볼 것은, EnvionmentCapable 인터페이스이다. 이 Environment가 제공하는 기능은 크게 프로파일과 프로퍼티로 나눌 수 있는데, 먼저 프로파일에 대해 알아보자. 1. 프로파일 인터페이스 이 프로파일은 개발/ 운영서버가..

Study/Spring 2022.02.06