gpt4 book ai didi

springfox - Swagger2Controller : Unable to find specification for group default

转载 作者:行者123 更新时间:2023-12-05 07:31:52 34 4
gpt4 key购买 nike

不工作/v2/api-docs 返回 404

此时在日志中 - Swagger2Controller:无法找到组默认规范

Beans Docker 在 Spring 创建正常...但是 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"

最佳答案

我忘记了..... ))))

springfox.documentation.auto-startup: true

关于springfox - Swagger2Controller : Unable to find specification for group default,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51619553/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com