我发现,解决方案是通过在组件扫描中包含过滤器来禁用双重初始化。就我而言:
@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); }}


