Merge pull request #103 from TeamBNBN/BE/user

feat: swagger
This commit is contained in:
Jungmin 2024-07-24 13:53:05 +09:00 committed by GitHub
commit e3faa6608d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -18,6 +18,7 @@ public class WebConfiguration implements WebMvcConfigurer {
public WebConfiguration(JWTInterceptor jwtInterceptor) {
super();
this.jwtInterceptor = jwtInterceptor;
}
@ -42,7 +43,10 @@ public class WebConfiguration implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(jwtInterceptor)
.addPathPatterns("/**") // 모든 경로에 대해 인터셉터 적용
.excludePathPatterns("swagger-ui/**","/auth/**", "/board/**", "/user/**","/lecture/**","/qna/**"); // 인증 없이 접근 가능한 경로 설정
.excludePathPatterns("/v3/api-docs/**","/swagger-resources/**","/webjars/**","/swagger-ui/**","/auth/**", "/board/**", "/user/**","/lecture/**","/qna/**"); // 인증 없이 접근 가능한 경로 설정
///v3/api-docs/**, /swagger-resources/**, /webjars/**
}
}

View File

@ -28,8 +28,7 @@ spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
springdoc.api-docs.path=/api/v3/api-docs
springdoc.swagger-ui.path=/api/swagger-ui.html
spring.mail.host=smtp.gmail.com
spring.mail.port=587