feat: swagger

This commit is contained in:
박정민 2024-07-24 13:52:31 +09:00
parent fd5638aec2
commit 6d03363a0e
2 changed files with 6 additions and 3 deletions

View File

@ -18,6 +18,7 @@ public class WebConfiguration implements WebMvcConfigurer {
public WebConfiguration(JWTInterceptor jwtInterceptor) { public WebConfiguration(JWTInterceptor jwtInterceptor) {
super(); super();
this.jwtInterceptor = jwtInterceptor; this.jwtInterceptor = jwtInterceptor;
} }
@ -42,7 +43,10 @@ public class WebConfiguration implements WebMvcConfigurer {
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(jwtInterceptor) registry.addInterceptor(jwtInterceptor)
.addPathPatterns("/**") // 모든 경로에 대해 인터셉터 적용 .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 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.host=smtp.gmail.com
spring.mail.port=587 spring.mail.port=587