Tool/Spring

· Tool/Spring
Filter 실행 흐름 요약 Filter는 그림과 같이 요청에서 최초, 최종 처리 단계의 위치에 있다. 요청의 최초, 최종 시점에서 필요한 작업(로깅, 보안)들을 하기 편리하다. DispatcherServlet보다 앞서 요청을 처리하는 것에 집중하자. Filter Chain Filter는 여러 Filter가 연결된 FilterChain으로 이루어져 있다. Filter 사용 방법 Filter 인터페이스를 상속받은 클래스를 구현하고, 클래스를 FilterChain에 등록하는 방식으로 사용한다. Spring Boot 환경에서 Filter를 @Component 애너테이션을 적용해서 빈으로 등록하면, Spring Boot가 자동으로 Filter를 Filter Chain에 등록한다. @Component @Order..
· Tool/Spring
애플리케이션 시작 후에 특정 코드를 실행하게 할 때 사용한다. 이 인터페이스를 상속한 클래스를 Bean으로 만들면 Spring boot가 실행된 후에 run 메서드가 자동으로 호출된다. 예제 코드 import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; ​ @Component public class MyApplicationRunner implements ApplicationRunner { ​ @Override public void run(ApplicationArguments args) th..
· Tool/Spring
Spring Data JPA를 사용할 때, 여러 예제에서 하나의 레포지토리 인터페이스에 Impl 클래스, Custom 인터페이스를 같이 사용하는 것을 볼 수 있다. 왜 이렇게 사용하는 것인지 알아보자. 스프링 레퍼런스를 참고했다. 혹시 내용에 오류가 보인다면 첨언 부탁드립니다. 등장하는 인터페이스와 클래스 목록 interface MyRepository extends JpaRepository, MyRepositoryCustom interface MyRepositoryCustom class MyRepositoryImpl implements MyRepositoryCustom class MyRepositoryCustomImpl implements MyRepositoryCustom Impl Impl은 Spring..
도_유
'Tool/Spring' 카테고리의 글 목록 (3 Page)