![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springsecurity
文章平均质量分 57
小昊爱金玉
这个作者很懒,什么都没留下…
展开
-
SpringSecurity学习(四)访问权限,角色匹配,验证码
访问权限访问权限可以配置URL匹配用户角色或权限 http.authorizeRequests() .antMatchers("/admin/**").hasRole("admin") .antMatchers("/user/**").hasRole("user")对应HiController@RestControllerpublic class HiController { @GetMapping("/hi") public String hi() { r原创 2021-06-09 10:15:01 · 434 阅读 · 0 评论 -
SpringSecurity学习(三)JDBC用户存储,注销登录
JDBC用户存储依赖<!--数据库连接--><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId></dependency><dependency> <groupId>mysql</groupId>原创 2021-06-09 10:14:12 · 252 阅读 · 0 评论 -
SpringSecurity学习(二)忽略静态请求,自定义登陆页面,密码加密
忽略静态请求1、@Overrideprotected void configure(HttpSecurity http) throws Exception { http //指令请求 .authorizeRequests() //满足以下路径的无条件允许访问 .antMatchers("/css/**", "/js/**", "/fonts/**").permitAll()原创 2021-06-09 10:13:24 · 1088 阅读 · 1 评论 -
SpringSecurity学习(一)helloworld
HelloWorld依赖<!--不知道为什么必须加,不加程序直接报Process finished with exit code 0后程序关闭关闭--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId>原创 2021-06-09 10:12:25 · 114 阅读 · 0 评论