方法一:使用@ImportResource

spring boot 加载指定xml

 

 

方法二:在test中

@ContextConfiguration(locations = "classpath:spring-profile.xml")
spring boot 加载指定xml

 

 

方法三:使用@PropertySource

spring boot 加载指定xml

 

 

方法四:方法四:使用SpringApplication.setSources()

spring boot 加载指定xml

 

相关文章:

  • 2021-08-30
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2021-09-10
  • 2020-04-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-14
  • 2021-11-24
  • 2021-09-27
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案