Skip to content

Commit

Permalink
feat : swagger 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
sominyun committed Feb 25, 2024
1 parent 940f1f7 commit 241a0a4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,21 @@ repositories {
}

dependencies {
//spring
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

//lombok
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

//mysql
runtimeOnly 'com.mysql:mysql-connector-j'

//swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'
}

tasks.named('test') {
Expand Down
23 changes: 23 additions & 0 deletions src/main/java/com/backend/soullive_a/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.backend.soullive_a.config;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {
@Bean
public OpenAPI openAPI() {
return new OpenAPI()
.components(new Components())
.info(apiInfo());
}
private Info apiInfo() {
return new Info()
.title("SoulLive_A")
.description("soullive_a swagger")
.version("1.0.0");
}
}

0 comments on commit 241a0a4

Please sign in to comment.