Move @ConfigurationProperties and supporting classes to Spring Framework
Move @ConfigurationProperties and supporting classes (like PropertiesConfigurationFactory) out of Spring Boot and into Spring Framework (or at least into their own module). The prefixed properties would be useful in library code where I don't want to pull in the entire spring-boot project.
It seems like something that should have been an enhancement to @PropertySource.
+1
Also Conditional Classes would be a good asset.
Agreed. It seems there are many "little" features in boot that would be useful in framework.
Prefixed properties would also be helpful for #808. Maybe not the auto-configure portion, but it would help segregate properties for multiple Hibernate JPA repositories which is my current need.
It's probably also worth raising an issue in the Spring Framework JIRA for this.
SPR-13799 has been raised.
@dsyer
My requirement needs a multiple datasources and i have configured with in application.yml. I am using Spring-Boot with JHispster in the project. i am using Spring-Boot's @ConfigurationProperties(prefix = "spring.datasource.mydb1.hikari") with multiple @ConfigurationProperties(prefix = "spring.datasource.mydb2.hikari") but unable to connect to the second Data Base.
Sample application.yml
spring:
datasource:
mydb1:
primary: true
url: DataBase URL1
name:
username: myusername1
password: mypassword1
mydb2:
url: DataBase URL2
name:
username: myusername2
password: mypassword2
@HariKiran9 that doesn't look relevant at all to this issue., If you have usage questions, please go to StackOverflow.