不工作/ v2 / api-docs返回 404
当前在日志中- Swagger2Controller:无法找到组默认设置的规范
Beans Docker在春季创建了... 但是Swagger2Controller.DocumentationCache为空...
请帮助我.....
之前,这是工作。...
@EnableSwagger2
@Configuration
class SwaggerConfig {
@Bean
fun allApi(): Docket {
return Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
}
}
等级:
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-aop')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot')
// Rest
compile('org.springframework.boot:spring-boot-starter-data-rest')
// Web
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
compile('org.springframework.boot:spring-boot-starter-web')
// Security
compile('org.springframework.security:spring-security-web')
compile('org.springframework.security:spring-security-config')
// Jackson
compile('com.fasterxml.jackson.module:jackson-module-kotlin')
// Vaadin
compile('com.vaadin:vaadin-spring-boot-starter')
// DB
runtime('org.postgresql:postgresql')
// Kotlin
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.jetbrains.kotlin:kotlin-reflect")
// Sentry
compile 'io.sentry:sentry:1.7.2'
compile 'com.getsentry.raven:raven-logback:8.0.3'
// Log to json
compile('ch.qos.logback.contrib:logback-json-classic:0.1.5')
compile "net.logstash.logback:logstash-logback-encoder:5.0"
// Logs {IF}
compile "org.codehaus.janino:janino"
// Swagger
compile "io.springfox:springfox-swagger2:2.9.2"
答案 0 :(得分:0)
我忘了.....))))
springfox.documentation.auto-startup: true