美文网首页Sping 专题coder
Springboot下使用XML配置bean

Springboot下使用XML配置bean

作者: S拒绝拖延 | 来源:发表于2020-03-13 18:28 被阅读0次

1.编写xml配置文件
2.创建Config类,添加@Configuration、@ImportResource注解,@ImportResource可以传入多个值

@Configuration
@ImportResource(locations= {"classpath:application-bean.xml"})
public class Config {
 
}

相关文章

网友评论

    本文标题:Springboot下使用XML配置bean

    本文链接:https://www.haomeiwen.com/subject/hmosshtx.html