Add configs and properties

This commit is contained in:
2023-09-28 18:02:06 +08:00
parent c57064d0f8
commit 91555b8160
14 changed files with 230 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
package top.fatweb.api.config
import io.swagger.v3.oas.models.OpenAPI
import io.swagger.v3.oas.models.info.Contact
import io.swagger.v3.oas.models.info.Info
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import top.fatweb.api.constants.ServerConstants
@Configuration
class SwaggerConfig {
@Bean
fun customOpenAPI(): OpenAPI? {
val contact = Contact().name("FatttSnake").url("https://fatweb.top").email("fatttsnake@fatweb.top")
return OpenAPI().info(Info().title("FatWeb API 文档").description("FatWeb 后端 API 文档,包含各个 Controller 调用信息").contact(contact).version(
ServerConstants.version))
}
}