When using the spring-boot-configuration-processor and leveraging the same @ConfigurationProperties prefix on an @Bean I am seeing an APT error in Eclipse in 1.4.0.RELEASE. While I agree that this error should be generated when using a duplicate prefix on an @Component class definition, I think this restriction should be relaxed on @Bean definitions.
I am referencing the External Config 3rd Party Configuration section in the reference guide.
Basic example of the issue
@Bean
@ConfigurationProperties("spring.datasource.tomcat")
public DataSource readDataSource() {
return DataSourceBuilder.create()
.url(properties.getReadUrl())
.username(properties.getUsername())
.password(properties.getPassword())
.build();
}
@Bean
@ConfigurationProperties("spring.datasource.tomcat")
public DataSource readWriteDataSource() {
return DataSourceBuilder.create()
.url(properties.getReadUrl())
.username(properties.getUsername())
.password(properties.getPassword())
.build();
}
Duplicate `@ConfigurationProperties` definition for prefix 'spring.datasource.tomcat'.
When using the
spring-boot-configuration-processorand leveraging the same@ConfigurationPropertiesprefix on an@BeanI am seeing an APT error in Eclipse in1.4.0.RELEASE. While I agree that this error should be generated when using a duplicate prefix on an@Componentclass definition, I think this restriction should be relaxed on@Beandefinitions.I am referencing the External Config 3rd Party Configuration section in the reference guide.
Basic example of the issue