摘要: 配置文件 Spring Boot提供一个名称为application的全局配置文件,支持两种格式properties格式与YAML格式 1,Properties格式 例如:修改Tomcat端口号 server.port=8080 2,YAML格式 YAML格式配置文件的扩展名可以是yaml或者yml 阅读全文
posted @ 2020-04-12 12:14 拯代码 阅读(634) 评论(0) 推荐(0) 编辑
摘要: 启动类 Spring Boot的启动类的作用是启动Spring Boot项目,是基于Main方法来运行的 注意:启动类在启动时会做注解扫描(@Controller,@Service,@Repository......) 扫描位置为同包或者子包下的注解,所以启动类应的位置应放于包的根目录下 启动器 S 阅读全文
posted @ 2020-04-12 11:28 拯代码 阅读(1030) 评论(0) 推荐(0) 编辑
摘要: 1,POM文件 1.1继承 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.6.RELEASE</version 阅读全文
posted @ 2020-04-12 11:27 拯代码 阅读(2042) 评论(0) 推荐(0) 编辑