| | |
| | | */ |
| | | @Configuration |
| | | @EnableSwagger2 |
| | | class Swagger2Configuration { |
| | | class Swagger2Configuration( |
| | | @Value("\${springfox.documentation.swagger.v2.enabled}") var swagger2Enable: Boolean, |
| | | ) { |
| | | |
| | | companion object { |
| | | const val SWAGGER_SCAN_BASE_PACKAGE = "cn.flightfeather.uav" |
| | | const val SWAGGER_SCAN_BASE_PACKAGE = "com.flightfeather.uav" |
| | | |
| | | const val VERSION = "1.0.0" |
| | | } |
| | | |
| | | @Value("\${springfox.documentation.swagger.v2.enabled}") |
| | | private val swagger2Enable: Boolean = true |
| | | // @Value("\${springfox.documentation.swagger.v2.enabled}") |
| | | // private val swagger2Enable: Boolean = true |
| | | |
| | | @Bean |
| | | fun createRestApi(): Docket = |
| | | Docket(DocumentationType.SWAGGER_2) |
| | | Docket(DocumentationType.OAS_30) |
| | | .enable(swagger2Enable) |
| | | .apiInfo(apiInfo()) |
| | | .select() |