SpringBoot入门
-
如何创建一个springboot框架web项目
-
使用springboot框架集成springmvc
pon.xml
<dependencies>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-webartifactId>
dependency>
?
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-testartifactId>
<scope>testscope>
dependency>
dependencies>
?
<build>
<plugins>
<plugin>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-maven-pluginartifactId>
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
-