boot相关依赖详解

快速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>

 

转载于:https://my.oschina.net/u/3457493/blog/3034021

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值