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 |
|---|---|---|
| 2193 | 2026. 02. 11. | Spring WebSocket과 STOMP로 실시간 채팅 구현 |
| 2192 | 2026. 02. 11. | Spring Boot 3.5 신기능 완전 정리 |
| 2131 | 2026. 02. 11. | Testcontainers로 Spring 통합 테스트 자동화 |
| 2130 | 2026. 02. 11. | Spring Batch 5.x 대용량 데이터 처리 패턴 |
| 2129 | 2026. 02. 11. | Spring Modulith: 모듈러 모놀리스 아키텍처 |
| 2128 | 2026. 02. 11. | Spring Data JPA 쿼리 최적화 고급 기법 |
| 2127 | 2026. 02. 11. | GraalVM Native Image와 Spring Boot AOT 컴파일 |
| 2126 | 2026. 02. 11. | Spring Cloud Gateway로 API Gateway 구축하기 |
| 2125 | 2026. 02. 11. | Spring Security 6.x OAuth2/OIDC 실전 구현 |
| 2124 | 2026. 02. 11. | Virtual Thread와 Spring WebFlux 성능 비교 |