2023-06-13 16:37:18 +08:00

382 B
Raw Blame History

spring-security

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