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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

No 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

本文标签: