Skip to content

Commit e125580

Browse files
committed
feat: SecurityConfig.java 추가
1 parent 5cfb442 commit e125580

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package cmf.commitField.global.security;
2+
3+
import org.springframework.context.annotation.Bean;
4+
import org.springframework.context.annotation.Configuration;
5+
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6+
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7+
import org.springframework.security.web.SecurityFilterChain;
8+
9+
@Configuration
10+
@EnableWebSecurity
11+
public class SecurityConfig {
12+
@Bean
13+
protected SecurityFilterChain config(HttpSecurity http) throws Exception {
14+
http
15+
.oauth2Login(oauth2 -> oauth2
16+
.loginPage("/login") // 로그인 페이지 지정
17+
);
18+
return http.build();
19+
}
20+
}

0 commit comments

Comments
 (0)