SpringBoot Swagger2 UI์ JWT ํ ํฐ Authorize ๋ฒํผ ๋ฃ๊ธฐ
BACKEND/Spring
2022. 2. 22. 21:12
** ๊ธฐ๋ณธ์ ์ผ๋ก security ์ค์ ๊ณผ swagger ์ค์ ์ด ๋ค ๋์ด์์์ ๋ฐํ์ผ๋ก ํ๋ค. SwaggerConfig.java @Configuration @EnableSwagger2 public class SwaggerConfig { @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .useDefaultResponseMessages(false) .select() .apis(RequestHandlerSelectors.basePackage("com.cherishpet.backend")) .paths(PathSelectors.ant("/api/**")) .build() .apiInfo(metaData()) .securityCon..