While working on a legacy project, sometimes it becomes so hard to find such small pieces of stuff. Recently I faced a similar problem where I had to load spring beans based on the loaded profiles respectively. With Spring Boot and annotation, it has become really easy. Just put the @Profile("profile1, profile2") and it works. Similarly, it is done in XML as well. All you … [Read more...] about Load Spring Beans Based On Different Profiles Via XML