会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
lwx_R
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
16
17
18
19
20
21
22
23
24
···
46
下一页
2023年1月30日
数据渲染
摘要: 1.javabean对象 <div> <div th:text="${user.getName()}"></div> </div> 2.List集合 <div th:each="item:${articles}"> <div th:text="${item.getTitle()}"></div> <
阅读全文
posted @ 2023-01-30 15:55 轩哥聊码
阅读(21)
评论(0)
推荐(0)
2023年1月18日
CSRF
摘要: 1.CSRF (Cross site request forgery) 跨站请求伪造,也被称为"OneClick Attack"或者Session Riding 通过伪造用户请求访问受信任站点的非法请求访问。 跨域:只要网络协议,ip 地址,端口中任何一个不相同就是跨域请求。 客户端与服务进行交互时
阅读全文
posted @ 2023-01-18 14:56 轩哥聊码
阅读(45)
评论(0)
推荐(0)
2023年1月17日
thymeleaf下使用
摘要: 1. 引入依赖 <dependency> <groupId>org.thymeleaf.extras</groupId> <artifactId>thymeleaf-extras-springsecurity5</artifactId> </dependency> <dependency> <gro
阅读全文
posted @ 2023-01-17 16:52 轩哥聊码
阅读(24)
评论(0)
推荐(0)
rememberMe功能
摘要: 1.引入依赖 <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.18</version> </dependency> <dependency> <group
阅读全文
posted @ 2023-01-17 16:47 轩哥聊码
阅读(23)
评论(0)
推荐(0)
注解使用
摘要: 1.@Secured 角色判断 1.1 开启注解 App启动类中加入注解 @EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true) 1.2 controller层下 @PostMapping("/toIndex
阅读全文
posted @ 2023-01-17 16:42 轩哥聊码
阅读(38)
评论(0)
推荐(0)
2023年1月15日
自定义异常处理
摘要: 1. MyAccessDeniedHandler类 @Component public class MyAccessDeniedHandler implements AccessDeniedHandler { @Override public void handle(HttpServletReque
阅读全文
posted @ 2023-01-15 17:47 轩哥聊码
阅读(26)
评论(0)
推荐(0)
控制访问方法
摘要: 1.授权匹配方法 ant/regex/mvc //授权 有顺序 先找放行的 anyRequest放在最后 http.authorizeRequests() //放行登录界面 ant表达式 .antMatchers("/css/**","js/**","**/*.png").permitAll() .
阅读全文
posted @ 2023-01-15 17:46 轩哥聊码
阅读(112)
评论(0)
推荐(0)
2023年1月14日
自定义用户登录验证
摘要: 1.自定义用户登录验证 把自带的登录逻辑改写以及界面的改写 1.1 UserDetailServiceImpl @Service public class UserDetailServiceImpl implements UserDetailsService { @Autowired private
阅读全文
posted @ 2023-01-14 20:15 轩哥聊码
阅读(60)
评论(0)
推荐(0)
SpringBoot中使用SpringSecurity
摘要: 1.maven配置 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 2.新建html页面去访问 用
阅读全文
posted @ 2023-01-14 19:59 轩哥聊码
阅读(53)
评论(0)
推荐(0)
SpringSecurity基础
摘要: 1.安全框架概述 解决系统安全问题的框架。 如果没有安全框架,我们需要手动处理每个资源的访问控制,非常麻烦。 使用安全框架,我们可以通过配置的方式实现对资源的访问限制。 2.常用安全框架 Spring Security: Spring家族一员。 是一个能够为基于Spring的企业应用系统提供声明式的
阅读全文
posted @ 2023-01-14 16:58 轩哥聊码
阅读(46)
评论(0)
推荐(0)
上一页
1
···
16
17
18
19
20
21
22
23
24
···
46
下一页
公告