-
Notifications
You must be signed in to change notification settings - Fork 41.2k
YAML property injection should work when including the base spring-boot module. #821
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
You haven't shown all the code you would need to get a @Component
public class Foo {
@Value("${example.someValue}")
String someValue;
}
@Component
public class Thing {
@Autowired
public void example(Foo foo) {
foo.someValue # should equal 'foobar'
}
} |
Adam's sample app is here: https://github.com/berlin-ab/springbootblog/tree/blog/configuration. It works for me. |
I needed to create a bean:
It works now, but: I do not think this should be necessary, but so far Spring Boot has not created Beans. I think the ability to configure using When using @value YAML values, I don't feel that I've left the core of Spring Boot. I've not yet asked for a web server, or a database, or a twitter client. I'm only looking for basic configuration information. |
Nevertheless this is a Core Spring "feature" (the non-appearance of a |
When I include these dependencies:
And I have this config file:
Then I should be able to do this:
The text was updated successfully, but these errors were encountered: