From 83b1b31b91fefa06e5eb4e6a8c3c29c99c0f92ef Mon Sep 17 00:00:00 2001 From: dustbox Date: Sun, 15 Dec 2024 01:45:02 +0900 Subject: [PATCH] feat: swagger base url fix --- src/main/java/com/on/server/ServerApplication.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/on/server/ServerApplication.java b/src/main/java/com/on/server/ServerApplication.java index 195633c5..aac50e5e 100644 --- a/src/main/java/com/on/server/ServerApplication.java +++ b/src/main/java/com/on/server/ServerApplication.java @@ -1,5 +1,8 @@ package com.on.server; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.servers.Server; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; @@ -7,6 +10,10 @@ @EnableJpaAuditing @SpringBootApplication(exclude = { SecurityAutoConfiguration.class }) +@OpenAPIDefinition( + info = @Info(title = "On Server API", version = "1.0.0"), + servers = { @Server(url = "/") } +) public class ServerApplication { public static void main(String[] args) {