Spring Boot中如何通过注解加载XML配置文件的方法有哪些?
- 内容介绍
- 相关推荐
本文共计39个文字,预计阅读时间需要1分钟。
plaintext使用Spring框架配置XML文件,通过注解导入资源。
gistfile1.txtimport org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; @Configuration @ImportResource(locations={"classpath:config/applicationContext.xml"}) public class ConfigXML { }
本文共计39个文字,预计阅读时间需要1分钟。
plaintext使用Spring框架配置XML文件,通过注解导入资源。
gistfile1.txtimport org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; @Configuration @ImportResource(locations={"classpath:config/applicationContext.xml"}) public class ConfigXML { }

