382 B
382 B
spring-security
- 首先在pom文件中增加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
- 可选项,在application.yml文件中配置默认的用户名密码
spring:
security:
user:
name: xiaoyan159
password: xiaoyan159062
roles: admin