2019年11月13日
摘要: 正常的情况是先加载yml,接下来加载properties文件。如果相同的配置存在于两个文件中。最后会使用properties中的配置。最后读取的优先集最高。 两个配置文件中的端口号不一样会读取properties中的端口号。 我在 application.properties 文件中配置了: ser 阅读全文
posted @ 2019-11-13 20:03 caidachun 阅读(5283) 评论(1) 推荐(1) 编辑
摘要: 1、 @ImportResource(locations = {"classpath:beantest.xml"})标注到启动类上,从类路径下加载xml文件,通过Application.getbean获取xml配置对象 一开始写错了// @PropertySource(value = { "clas 阅读全文
posted @ 2019-11-13 13:13 caidachun 阅读(1020) 评论(0) 推荐(0) 编辑