Fix : 수정
This commit is contained in:
parent
08ac992234
commit
33bc77e362
@ -13,7 +13,7 @@ import org.springframework.security.web.SecurityFilterChain;
|
||||
* 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정
|
||||
*/
|
||||
@Configuration
|
||||
//@EnableWebSecurity
|
||||
@EnableWebSecurity
|
||||
public class SecurityConfig {
|
||||
|
||||
@Bean
|
||||
@ -23,7 +23,7 @@ public class SecurityConfig {
|
||||
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
||||
.authorizeHttpRequests(auth -> auth
|
||||
// Swagger 관련 경로 모두 허용
|
||||
.requestMatchers("/swagger-ui/**", "/swagger-ui.html").permitAll()
|
||||
.requestMatchers("/swagger-ui.html","/swagger-ui/**", "/swagger-ui.html").permitAll()
|
||||
.requestMatchers("/api-docs/**", "/v3/api-docs/**").permitAll()
|
||||
.requestMatchers("/swagger-resources/**", "/webjars/**").permitAll()
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
"com.ktds.hi.common.entity",
|
||||
"com.ktds.hi.common.audit"
|
||||
})
|
||||
// @EnableJpaRepositories(basePackages = "com.ktds.hi.common.repository")
|
||||
@EnableJpaRepositories(basePackages = "com.ktds.hi.common.repository")
|
||||
public class CommonModuleConfiguration {
|
||||
// 설정 클래스는 어노테이션만으로도 충분
|
||||
}
|
||||
|
||||
@ -39,7 +39,8 @@ public class SecurityConfig {
|
||||
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
||||
.authorizeHttpRequests(authz -> authz
|
||||
.requestMatchers("/api/auth/**", "/api/members/register").permitAll()
|
||||
.requestMatchers("/swagger-ui/**", "/v3/api-docs/**").permitAll()
|
||||
.requestMatchers("/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**").permitAll()
|
||||
.requestMatchers("/swagger-resources/**", "/webjars/**").permitAll()
|
||||
.requestMatchers("/actuator/**").permitAll()
|
||||
.anyRequest().authenticated()
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user