-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration property binding processes JavaBean methods in a non-deterministic order which may result in variable behavior #24068
Comments
Thanks for the sample. You currently have two ways of getting the value of your
Java reflection returns a class's methods in an unspecified and variable order. It's this variable order that causes the failure to be intermittent – it only happens when You can fix your problem by removing your We'll keep this issue open to look at making the ordering in which the methods are processed deterministic. We may be able to achieve this by sorting them by their names. |
Framework's configuration class parsing uses ASM to ensure consistent |
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:
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:
export VAULT_TOKEN_RUNTIME=242342
mvn clean install
java -jar target/relaxed-binding-0.0.1-SNAPSHOT.jar
Do you have an idea what is wrong with the relaxed binding?
Regards!
The text was updated successfully, but these errors were encountered: