Skip to content

Commit b2a4fb0

Browse files
committed
[FEAT] 테스트 코드 실행 시 csrf 비활성화
1 parent ed63b11 commit b2a4fb0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package org.vsa.server;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.springframework.boot.test.context.SpringBootTest;
5+
import org.springframework.context.annotation.Bean;
6+
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
7+
import org.springframework.security.web.SecurityFilterChain;
8+
9+
@SpringBootTest
10+
class ServerApplicationTests {
11+
@Bean
12+
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
13+
http
14+
.csrf(csrf -> csrf.disable())
15+
.authorizeHttpRequests(auth -> auth
16+
.anyRequest().permitAll()
17+
);
18+
19+
return http.build();
20+
}
21+
22+
@Test
23+
void contextLoads() {
24+
}
25+
26+
}

0 commit comments

Comments
 (0)