diff --git a/build.gradle b/build.gradle index c9e5761f..68d9a7dc 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ buildscript { spring_dependency_management_version = '1.1.6' spotless_version = '6.25.0' jjwt_version = '0.11.5' + swagger_version = '2.0.2' } } @@ -39,8 +40,7 @@ dependencies { /** Json Web Token */ implementation "io.jsonwebtoken:jjwt-api:${jjwt_version}" - runtimeOnly "io.jsonwebtoken:jjwt-impl:${jjwt_version}" - runtimeOnly "io.jsonwebtoken:jjwt-jackson:${jjwt_version}" + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${swagger_version}" testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/src/main/java/com/ordertogether/team14_be/config/SwaggerConfig.java b/src/main/java/com/ordertogether/team14_be/config/SwaggerConfig.java new file mode 100644 index 00000000..68fef525 --- /dev/null +++ b/src/main/java/com/ordertogether/team14_be/config/SwaggerConfig.java @@ -0,0 +1,20 @@ +package com.ordertogether.team14_be.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("14조 API").description("전남대 14조 Swagger").version("2.0.0"); + } +}