SpringBoot入门
-
如何创建一个springboot框架web项目
-
使用springboot框架集成springmvc
pon.xml
<dependencies>
<!--SpringBoot框架web项目的起步依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--SpringBoot框架测试起步依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- SpringBoot编译打包的插件 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> -
使用springboot框架的核心配置文件application.properties
#设置内嵌Tomcat端口号
server.port=8081
#设置上下文根
server.servlet.context-path=/springboot -
使用springboot框架的核心配置文件application.yml或者application.yaml
-
如果springboot框架的核心配置文件application.properties和application.yaml同时存在会是什么情况?
优先使用application.properties
-
多环境下核心配置文件的使用,工作中开发的环境有哪些:开发环境、测试环境、准生产环境、生产环境
application.properties主核心配置文件
#springboot主核心配置文件
#激活使用的配置文件
spring.profiles.active=ready -
springboot在核心配置文件application.properties自定义配置一个一个获取@Value
-
springboot在核心配置文件将自定义配置映射到一个对象
server.port=8080
server.servlet.context-path=
school.name=changge
school.websit=http://www.changge.com
abc.name=abc
abc.websit=http://www.abc.com -
springboot集成jsp
-

浙公网安备 33010602011771号