개발자 도전기
[Spring] 컨트롤러로 요청 시 302 Found 응답 뜰 때 본문
요청 경로로 302 Found와 /login 경로로 304 Not Modified 요청이 함께 뜬다면
스프링 시큐리티가 막고 있는 것이니 @SpringBootApplication에 exclude = SecurityAutoConfiguration.class 추가해주자
@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
public class BackendApplication {
public static void main(String[] args) {
SpringApplication.run(BackendApplication.class, args);
}
}
csrf가 막고 있어서 그렇다,, 시큐리티 자동 설정 해제하니 200 응답 확인됨
dependencies에 시큐리티 추가한 적이 없는데 대체 웨 ,,, ??
OAuth2 Resource Server를 추가했는데 이게 시큐리티를 포함하고 있기 때문...
'개발공부 > Spring' 카테고리의 다른 글
[Spring] a bean of type 'org.apache.catalina.filters.CorsFilter' that could not be found. (0) | 2024.06.11 |
---|---|
[Spring] @Value 어노테이션으로 주입한 값이 null일 때 (0) | 2024.06.07 |
[Spring] Encoded password does not look like BCrypt (0) | 2024.05.24 |
[Spring] Ajax로 이메일 중복 확인하기 (0) | 2024.05.02 |
[Spring] Service로 비즈니스 로직 처리하기 (0) | 2024.05.01 |