pom.xml中需要加
<!--安全框架+模板引擎--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>
启动项目 可用最基本的安全框架 用户名user 密码是idea里面的那串字符
登陆即可
密码 可改