当前位置:网站首页>Security exception handling mechanism
Security exception handling mechanism
2022-07-28 03:56:00 【Program three two lines】
One 、 Outline the exception mechanism
Spring security There are two main types of exceptions in : Authentication exception (AuthenticationException) And permission exception (AccessDeniedException), Other exceptions are thrown , hand spring To deal with .
Authentication exception class

Permission exception

Two 、 Principle analysis
Spring security The exception handling task in is mainly in ExceptionTranslationFilter Completed in the filter . The filter mainly deals with AuthenticationException and AccessDeniedException Exception of type , Other exceptions will continue to be thrown , Give it to the upper container for disposal .
stay WebSecurityConfigurerAdapter#getHttp Method HttpSecurity When initializing , It's called exceptionHandling() Method to configure ExceptionTranslationFilter filter :
protected final HttpSecurity getHttp() throws Exception {
// ...
if (!this.disableDefault边栏推荐
- [openvx] VX for basic use of objects_ pyramid
- un7.27:如何在idea中成功搭建若依框架项目?
- Convert py file to exe executable file
- Dynamic programming - 416. Segmentation and subsets
- ES6 from entry to mastery 07: Deconstruction assignment
- 【原型与原型链】初识原型与原型链~
- 面试必备杀技:SQL查询专项训练!
- Prefix-Tuning: Optimizing Continuous Prompts for Generation
- Ch340 RTS DTR pin programming drives OLED
- Is there a bonus period for robot engineering
猜你喜欢

un7.27:如何在idea中成功搭建若依框架项目?

月薪28K学员 自动化测试经验分享

Implementation of online rental system based on SSM

Advanced Mathematics (Seventh Edition) Tongji University exercises 3-5 personal solutions

《剑指offer》| 刷题小记

【力扣】1337.矩阵中战斗力最弱的k行

数据丰富的计算:M.2在边缘遇到AI

servlet使用

一名合格的软件测试工程师,应该具备哪些技术能力?
![Error no matching function for call to 'std:: exception:: exception (const char [15])' problem solving](/img/d1/2fbdf42cf60b5382b5a35c64b172b9.png)
Error no matching function for call to 'std:: exception:: exception (const char [15])' problem solving
随机推荐
Day08 redis的基础知识
My creation anniversary
Advanced Mathematics (Seventh Edition) Tongji University exercises 3-5 personal solutions
conda虚拟环境总结与解读
【LeetCode】34、在排序数组中查找元素的第一个和最后一个位置
[openvx] VX for basic use of objects_ convolution
构建“产业大脑”,以“数字化”提升园区运营管理及服务能力!
Appnium -- app automated test tool
servlet使用
C语言:求一个整数存储在内存中的二进制中1的个数
ES6 from getting started to mastering 08: extended object functions
月薪28K学员 自动化测试经验分享
Advanced Mathematics (Seventh Edition) Tongji University exercises 3-4 personal solutions (the last 8 questions)
Detailed explanation of string + memory function (C language)
Interview essential skills: SQL query special training!
Appnium--APP自动化测试工具
Ch340 RTS DTR pin programming drives OLED
Interface automation test, complete introduction
【无标题】
Monotonic stack - 739. Daily temperature