Configuring base package scan for Spring Boot Application at Runtime
问题 I'm running a Spring Boot Application within a Tomcat instance packaged as a war file. I would like to be able to add "packages" to my instance in the form of rest services. To that end I need to be able to configure scanBasePackages in the @SpringBootApplication annotation at runtime. i.e. when tomcat starts up. For now I have ... @SpringBootApplication(scanBasePackages="path1, path2") public class RestApplication extends SpringBootServletInitializer { //code } ...but I would like to have