-
Notifications
You must be signed in to change notification settings - Fork 38.5k
@Component class using @Value cannot access @PropertySource proeprties [SPR-8516] #13161
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
Chris Beams commented Hi Marcel, This is actually as designed. Replacement of ${...} placeholders, whether in XML 'value' attributes or in |
Marcel Overdijk commented OK Chris, my bad. Defining
works perfectly. |
Chris Beams commented Great! |
Mikhail Tokarev commented Chris, Why a replacement of ${...} placeholders for Resource type using
i'm using spring 3.1.1.RELEASE |
Chris Beams commented Mikhail, I'm not sure exactly what you're asking here. Can you elaborate? Thanks. |
Mikhail Tokarev commented I'm using
In a
My config.properties file:
The value of the propertyValue it is: "${propertyValue}". But the value of the folderPath it is: "file:/tmp". |
Chris Beams commented Right. Have you added a
This is also described in |
Mikhail Tokarev commented No, I have not added PSPC. I understand why it does not work for String, but I do not understand why it works for Resource. |
Chris Beams commented Sorry Mikhail, I misunderstood your question. The reason it works by default for So the |
Mikhail Tokarev commented ok, I see. In my opinion this is not an explicit behavior and I would like at this specify. |
Marcel Overdijk opened SPR-8516 and commented
I'm using a
@Configuration
class like:In a
@Component
class I would like to inject a property value using the@Value
annotation like:Although the property exists, it's not injected in the variable.
When logging the value of the maxLoginFailures it is: "${authentication.max.login.failures}"
Note that I'm testing on M2.
Affects: 3.1 M2
Issue Links:
@PropertySource
is usedThe text was updated successfully, but these errors were encountered: