创建项目选择了springboot security
pom.xml配置如下
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
直接运行项目
后台输出如下条目:
Using generated security password: 16122ac22-7896-41c2-a756-c0e533ef04aa