SpringBoot中使用SpringSecurity

1.maven配置

 <dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-security</artifactId>
</dependency>

2.新建html页面去访问


用户名user 密码在控制台上打印出来了

posted @ 2023-01-14 19:59  lwx_R  阅读(40)  评论(0)    收藏  举报