Skip to content

Configuration property binding processes JavaBean methods in a non-deterministic order which may result in variable behavior #24068

Closed
@emilnkrastev

Description

@emilnkrastev

Hello team,

I'm currently using Spring Boot 2.3.5.RELEASE and I'm trying to provide property via environment variable but the Spring boot app fails to start with the following exception:
`


APPLICATION FAILED TO START


Description:

Failed to bind properties under "vault" to com.example.relaxedbinding.Configuration:

Property: vault.token-runtime
Value: 242342
Origin: System Environment Property "VAULT_TOKEN_RUNTIME"
Reason: Failed to bind properties under 'vault' to com.example.relaxedbinding.Configuration

Action:

Update your application's configuration
`

The weird thing is that it does not fail on each run. The failure rate is 30%-ish.

Here is a link to my githup repo sample project:
https://github.com/emilnkrastev/relaxed-binding

Step to reproduce the issue:

  1. export VAULT_TOKEN_RUNTIME=242342
  2. mvn clean install
  3. java -jar target/relaxed-binding-0.0.1-SNAPSHOT.jar
  4. If it does not fail go to step 3 and try again.

Do you have an idea what is wrong with the relaxed binding?

Regards!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions