-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Binding fails in presence of a synthetic constructor #18670
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
Comments
I've attached a small reproduce project. |
I have the same issue. Does someone have a workaround ? |
If you does not use the JDNI feature, probably you can prevent this issue by disabled the Spring's JNDI feature. |
Unfortunately our app is deployed to an application server and it utilize jndi for external configuration, so this workaround does not help us. |
@kazuki43zoo Thank you for the sample. To get the sample to fail, I had to add
I'm not sure there's anything we can do here if no setter is found for the property. Adding |
Is deploying on the application server(e.g. Tomcat)?
It is failing without adding |
Thanks @kazuki43zoo we were able to reproduce the behavior you mentioned when deploying it as a war. There are a couple of issues here that got introduced when constructor binding was added.
|
Actually I also meet this issue at spring -boot version 2.7.18 when it comes to I use mybatis as my ORM framework at my private project, that's wired! I recreate a new project just dependency the required dependencies with spring-boot 2.7.18 and |
@Zhoutzzz Spring Boot 2.7.x is not supported anymore for OSS users. Please upgrade to a supported version. |
@bclozel But the version already fixed, we don't have permission to change it, we must be need to find other way to resolve this issue. By the way we meet this issue because we use the code like this
|
Uh oh!
There was an error while loading. Please reload this page.
There are cases that configuration property binding does not work when integrating 3rd party configuration class and it deploy to the application server as war file(= When JndiPropertySource is enabled).
Versions
Details
For example, following properties class does not work. (As actually, MyBatis's configuration class matches this pattern...)
StackTrace
Related Issue
Reproduce project
How to reproduce
The text was updated successfully, but these errors were encountered: