快速web应用开发与spring-boot-starter-web
首先,boot项目默认起来的容器为tomcat,所以在新建的boot项目中缺少了spring-boot-starter-web这个依赖,它表示项目支持boot内置tomcat启动 spring-boot-starter-web默认使用嵌套式的Tomcat作为Web容器对外提供HTTP服务,默认端口8080对外监听和提供服务 我们同样可以使用spring-boot-starter-jetty或者spring-boot-starter-undertow作为Web容器。 想改变默认的配置端口,可以在application.properties中指定:
server.port = 9000(the port number you want)
数据访问与spring-boot-starter-jdbc
maven依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
spring-boot-starter-aop应用及其使用场景
AOP:Aspect Oriented Programming,面向切面编程
1.位于spring-boot-autoconfigure的org.sringframework.boot.autoconfigure.aop.AopAutoConfiguration提供的@Configuration配置类和相应的配置项,即下面的2个配置项:
spring.aop.auto=true
spring.aop.proxy-target-class=false
2.spring-boot-starter-aop模块提供了针对spring-aop aspectjrt 和aspectjweaver的依赖
应用安全与spring-boot-starter-security
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>