Skip to content

Commit

Permalink
fix: SecurityConfig build.gradle 파일 수정#9
Browse files Browse the repository at this point in the history
  • Loading branch information
SubiHwang committed Jan 14, 2024
1 parent e08fd84 commit e58bb8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 33 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4'
implementation 'org.springframework.boot:spring-boot-starter-security'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.mysql:mysql-connector-j'
Expand Down
40 changes: 8 additions & 32 deletions src/main/java/com/endlesshorses/oot/swagger/SwaggerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,22 @@
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {

@Bean
public GroupedOpenApi getItemApi() {

return GroupedOpenApi
.builder()
.group("item")
.pathsToMatch("/api/item/**")
.build();
}

@Bean
public GroupedOpenApi getMemberApi() {

return GroupedOpenApi
.builder()
.group("member")
.pathsToMatch("/api/member/**")
.build();

}

@Bean
public OpenAPI getOpenApi() {

return new OpenAPI().components(new Components())
.info(getInfo());

public OpenAPI openAPI() {
return new OpenAPI()
.components(new Components())
.info(apiInfo());
}

private Info getInfo() {
private Info apiInfo() {
return new Info()
.version("1.0.0")
.description("COMMERCE REST API DOC")
.title("COMMERCE");
.title("OOT")
.description("OOT API 명세")
.version("1.0.0");
}
}

0 comments on commit e58bb8e

Please sign in to comment.