Skip to content

Commit ec59725

Browse files
committed
✨ [Feat]: Swagger 설정
1 parent 17a9ce9 commit ec59725

File tree

5 files changed

+28
-1
lines changed

5 files changed

+28
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ out/
3535

3636
### VS Code ###
3737
.vscode/
38+
39+
application-local.yml

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dependencies {
2929
runtimeOnly 'com.mysql:mysql-connector-j'
3030
annotationProcessor 'org.projectlombok:lombok'
3131
testImplementation 'org.springframework.boot:spring-boot-starter-test'
32+
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'
3233
}
3334

3435
tasks.named('test') {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.um5th.hackerthon.infjournal.config;
2+
3+
import io.swagger.v3.oas.models.Components;
4+
import io.swagger.v3.oas.models.OpenAPI;
5+
import io.swagger.v3.oas.models.info.Info;
6+
import org.springframework.context.annotation.Bean;
7+
import org.springframework.context.annotation.Configuration;
8+
9+
@Configuration
10+
public class SwaggerConfig {
11+
@Bean
12+
public OpenAPI openAPI() {
13+
Info info = new Info()
14+
.title("INFJournal")
15+
.description("INFJournal API 명세서")
16+
.version("v1.0.0");
17+
18+
return new OpenAPI()
19+
.components(new Components())
20+
.info(info);
21+
}
22+
}

src/main/resources/application.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/main/resources/application.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
spring:
2+
profiles:
3+
active: local

0 commit comments

Comments
 (0)