原理:顺序是不可以改变的

增加pom文件
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>1.5.6.RELEASE</version>
</dependency>
在application中配置
spring.session.store-type = none
# 是否使用安全登录
security.basic.enabled = true
第一次登入
用户名:user
密码:查看日志
往后访问就不需要请求了
自定义登录的接口
