'CbsConfiguration' bean is statefull. The singleton instance lifespan should match application lifespan.
The problem was bootstrap context (and all it's beans) are destroyed during bootstrap context refresh.
Change-Id: Ib02cd49c37935422d4ca861afee55f621015146e
Issue-ID: DCAEGEN2-1647
Signed-off-by: grabinsk <maciej.grabinski@nokia.com>
@Configuration
@EnableConfigurationProperties(CbsProperties.class)
public class CbsBootstrapConfiguration {
+ private static final CbsConfiguration CBS_CONFIGURATION = new CbsConfiguration();
@Bean
public CbsProperties cbsProperties() {
@Bean
public CbsConfiguration cbsConfiguration() {
- return new CbsConfiguration();
+ return CBS_CONFIGURATION;
}
}