Skip to content

Unresolvable placeholder in the value of spring.datasource.url causes a startup failure even when there is a user-provided DataSource bean #20438

@fedelopez

Description

@fedelopez

I have an application.yml config file in a Spring Boot 2.2.4 app with the following entry:

spring.datasource.url: ${DATA_SOURCE_URL}

DATA_SOURCE_URL is available only when running the app locally, not in the cloud.

In the cloud (Pivotal Cloud Foundry) we have a PostgreSQL service that injects the data source connection properties automatically using Spring Cloud Connectors. This work perfectly in 2.2.4.

When bumping up the Spring Boot version to 2.2.5 the app won't start:

Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'DATA_SOURCE_URL' in value "${DATA_SOURCE_URL}"

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions