Skip to content
Advertisement

Tag: spring-context

Merging two Spring Application Context without closing the first application context

In our application start-up, we are creating one application context having its own bean configuration xml. Then depending up on certain logic, we would need to dynamically load/import the second bean configuration into the existing application context. One option is to close the existing application context and creating a new application context by importing both the bean definition xml files.

Binding two Property classes and I need to merge them to one and Bind that too

I am working in a library which configures Property classes through Spring properties in an application.yml file. I am moving from a deprecated prefix(com.myapp.deprecated) to a new prefix(com.myapp.newprefix). I want to maintain old applications that are already using the deprecated prefix for a short while to allow for a migration period. To achieve that I have made two classes that

Autowired property is null in EnvironmentPostProcessor implementation class on startup

In my SpringBoot app, I have Autowired an configObject in the class that implements EnvironmentPostProcessor. The injected class reads data from a different source on startup as this is required for the app to work. But upon starting the application, the configObject is coming off as Null. And the AppEnvironmentPostProcessor class where the Autowired object is called. This class is

Advertisement