摘要: 1.spring boot启动的时候加载主配置类,开启了自动配置功能@EnableAutoConfiguration,先看一下启动类的main方法 public ConfigurableApplicationContext run(String... args) { StopWatch stopWa 阅读全文
posted @ 2018-06-07 17:05 吴振照 阅读(2481) 评论(0) 推荐(0) 编辑
摘要: 全局配置: Spring Boot 的默 认 配 置 文 件位置为 src/main/resources/application.properties 。关于SpringBoot应用的配置内容都可以集中在该文件中, 根据我们引入的不同Starter模块,可以在这里定义容器端口号、 数据库连接信息、 阅读全文
posted @ 2018-06-07 15:20 吴振照 阅读(959) 评论(0) 推荐(0) 编辑
摘要: package com.newings.disaster.shelters.configuration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation 阅读全文
posted @ 2018-06-07 14:30 吴振照 阅读(264) 评论(0) 推荐(0) 编辑