-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #98 from zeze1004/chore/auth-permit-swagger
[#97] Swagger API 호출시 401 리턴되는 이슈 수정
Showing
7 changed files
with
57 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
package org.wedding.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.web.servlet.config.annotation.EnableWebMvc; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import io.swagger.v3.oas.models.Components; | ||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import io.swagger.v3.oas.models.security.SecurityRequirement; | ||
import io.swagger.v3.oas.models.security.SecurityScheme; | ||
|
||
@EnableWebMvc | ||
@Configuration | ||
public class SwaggerConfig { | ||
|
||
@Bean | ||
public OpenAPI openAPI() { | ||
return new OpenAPI() | ||
.components(new Components()) | ||
.addSecurityItem(new SecurityRequirement().addList("BearerAuth")) | ||
.components(new Components().addSecuritySchemes("BearerAuth", | ||
new SecurityScheme() | ||
.type(SecurityScheme.Type.HTTP) | ||
.scheme("bearer") | ||
.bearerFormat("JWT"))) | ||
.info(apiInfo()); | ||
} | ||
|
||
private Info apiInfo() { | ||
return new Info() | ||
.title("Wedding Project API 명세서") | ||
.description("Wedding Project 프로젝트에 사용되는 API 명세서") | ||
.title("Wedding JIRA Planner API 명세서") | ||
.description("Wedding JIRA Planner 프로젝트에 사용되는 API 명세서") | ||
.version("1.0.0"); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# local 프로필 설정 | ||
spring: | ||
profiles: | ||
active: local | ||
datasource: | ||
url: jdbc:mysql://localhost:3306/wedding | ||
username: root | ||
password: | ||
mybatis: | ||
mapper-locations: classpath:mapper/**/*.xml | ||
type-aliases-package: org.wedding.* | ||
configuration: | ||
map-underscore-to-camel-case: true | ||
type-handlers-package: org.wedding.adapter.out.persistence.mybatis | ||
|
||
--- | ||
|
||
# dev 프로필 설정 | ||
spring: | ||
config: | ||
activate: | ||
on-profile: dev | ||
datasource: | ||
url: jdbc:mysql://mysql:3306/wedding | ||
mybatis: | ||
mapper-locations: classpath:mapper/**/*.xml | ||
type-aliases-package: org.wedding.* | ||
configuration: | ||
map-underscore-to-camel-case: true | ||
type-handlers-package: org.wedding.adapter.out.persistence.mybatis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters