admin管理员组文章数量:1393889
My problem:
I'm getting a startup error in my dev environment (running with Docker + Spring Boot docker-compose). Locally (from IntelliJ IDEA) everything works fine.
PROBLEM DESCRIPTION
APPLICATION FAILED TO START
Description:
Failed to bind properties under 'springdoc' to .springdoc.core.properties.SpringDocConfigProperties:
Reason: .springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [.springdoc.core.properties.SpringDocConfigProperties]
Action:
Update your application's configuration
My setup:
Spring Boot version: 3.4.x
SpringDoc version:
<dependency>
<groupId>.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.8.6</version>
</dependency>
<parent>
<groupId>.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.4</version>
<relativePath/>
</parent>
Configuration in application.yml
springdoc:
swagger-ui:
enabled: true
path: /swagger-ui
url: https://.../v3/api-docs
What I’ve already checked:
Dependency versions match the Spring Boot 3.4 requirements. The config format matches the documentation. Works perfectly in local development. Fails only in dev (Dockerized, running from the built .jar file).
Question: What might cause this SpringDoc property binding failure only in a Docker/dev environment? Could it be related to missing dependencies during packaging, or some subtle config issue?
My problem:
I'm getting a startup error in my dev environment (running with Docker + Spring Boot docker-compose). Locally (from IntelliJ IDEA) everything works fine.
PROBLEM DESCRIPTION
APPLICATION FAILED TO START
Description:
Failed to bind properties under 'springdoc' to .springdoc.core.properties.SpringDocConfigProperties:
Reason: .springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [.springdoc.core.properties.SpringDocConfigProperties]
Action:
Update your application's configuration
My setup:
Spring Boot version: 3.4.x
SpringDoc version:
<dependency>
<groupId>.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.8.6</version>
</dependency>
<parent>
<groupId>.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.4</version>
<relativePath/>
</parent>
Configuration in application.yml
springdoc:
swagger-ui:
enabled: true
path: /swagger-ui
url: https://.../v3/api-docs
What I’ve already checked:
Dependency versions match the Spring Boot 3.4 requirements. The config format matches the documentation. Works perfectly in local development. Fails only in dev (Dockerized, running from the built .jar file).
Question: What might cause this SpringDoc property binding failure only in a Docker/dev environment? Could it be related to missing dependencies during packaging, or some subtle config issue?
Share Improve this question asked Mar 27 at 14:10 Alexander KukhtinAlexander Kukhtin 252 bronze badges1 Answer
Reset to default 0No converter found capable of converting from type [java.lang.String] to type [.springdoc.core.properties.SpringDocConfigProperties]
typically occurs when Spring-Boot is trying to bind a configuration property to a custom type but can't find a suitable converter to perform the conversion.
This means there is misconfiguration in your application properties file.
Make sure the configuration properties for SpringDocConfigProperties are correctly defined in your application.properties
The configuration.properties should look like this:
springdoc.api-docs.enabled=true
springdoc.swagger-ui.enabled=true
in application.yml:
springdoc:
api-docs:
enabled: true
swagger-ui:
enabled: true
本文标签:
版权声明:本文标题:java - Failed to bind properties under 'springdoc' to org.springdoc.core.properties.SpringDocConfigProperties - 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744082336a2587876.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论