Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

개발자 도전기

[Spring] 컨트롤러로 요청 시 302 Found 응답 뜰 때 본문

개발공부/Spring

[Spring] 컨트롤러로 요청 시 302 Found 응답 뜰 때

jnnjnn 2024. 6. 4. 00:01

요청 경로로 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를 추가했는데 이게 시큐리티를 포함하고 있기 때문...