I keep getting the ConflictingBeanDefinitionException
error in my Spring boot application. I am not entirely sure as to how to address it, I have several @Con
The solution, as I found out, is to disable double initialization by including a filter in the component scan. In my case:
@EnableScheduling
@EnableAspectJAutoProxy
@EnableCaching
@Configuration
@ComponentScan(basePackages = { "org.kemri.wellcome.hie" },
excludeFilters = {@Filter(value = Controller.class, type = FilterType.ANNOTATION)})
@EnableAutoConfiguration
@PropertySource("classpath:application.properties")
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}