默认加载的都是国外的源,我们可以配置国内的源. 右键项目-->maven-->Open ''setting.xml'' 复制下面的代码进去.保存. 我这里使用的版本是 ideaIU-14.1 <mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an…
最近遇到个场景,需要在使用@Bean注解定义bean的时候为对象设置一些属性,比如扫描路径,因为路径经常发布新特性的时候需要修改,所以就计划着放在配置文件中,然后通过@ConfigurationProperties或@Value结合@PropertySource注入,类似如下: @Configuration @PropertySource("classpath:application.properties") public class AbcConfig { @Value("…