基于java的配置中的Spring导入
也许我把这个问题的措辞弄错了。我的意思是,我想加载类路径中可用的所有java配置文件,而不是applicationContext.xml。像这样的-基于java的配置中的Spring导入,java,spring,configuration,Java,Spring,Configuration,也许我把这个问题的措辞弄错了。我的意思是,我想加载类路径中可用的所有java配置文件,而不是applicationContext.xml。像这样的- @Configuration @ImportResource("Some other configuration java files which might be in the dependant projects but in the same classpath") public class AppConfig { } 尝试使用@Im
@Configuration
@ImportResource("Some other configuration java files which might be in the dependant projects but in the same classpath")
public class AppConfig {
}
尝试使用
@ImportResource
注释以基于java的配置导入xml配置
@Configuration
@ImportResource("classpath*:beancontext/applicationContext.xml")
public class AppConfig {
}
@ImportResource
。谢谢你的回复。也许我把这个问题的措辞弄错了