Contents
see List작성일 2022. 05. 24.
private static final List<String> URL_PATTERNS = Arrays.asList("/**"); // 인터셉터가 동작 해야 될 요청
// 주소 mapping 목록
// 인터셉터 주소 세팅
@Bean
public AuthInterceptor customInterceptor() {
return new AuthInterceptor();
}
@Autowired
private AuthInterceptor authInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(authInterceptor).addPathPatterns(URL_PATTERNS);
// .excludePathPatterns("/board");
}
new 로 생성을 해 의존성 주입이 되지 않아 그런다.
위처럼 @Bean 으로 등록해 주면 해결된다.
spring
| No | 작성일 | Title |
|---|---|---|
| 2123 | 2026. 02. 11. | Spring AI: 스프링에서 LLM 통합하기 |
| 2122 | 2026. 02. 11. | Spring Boot 3.4 신기능과 마이그레이션 가이드 |
| 2013 | 2025. 11. 30. | Spring Cache 추상화 - Redis 캐시 적용 |
| 2012 | 2025. 11. 30. | Spring Validation - Bean Validation 활용 |
| 2011 | 2025. 11. 30. | Spring Profile로 환경별 설정 관리 |
| 2010 | 2025. 11. 30. | Spring AOP로 로깅과 트랜잭션 처리 |
| 2009 | 2025. 11. 30. | Spring Batch 대용량 데이터 처리 |
| 2008 | 2025. 11. 30. | Spring Cloud Gateway로 API Gateway 구축 |
| 2007 | 2025. 11. 30. | Spring WebFlux - 리액티브 프로그래밍 입문 |
| 2006 | 2025. 11. 30. | Spring Data JPA 쿼리 메서드 완벽 가이드 |