全局异常处理 springboot
时间: 2023-08-29 22:10:54 浏览: 113
springboot全局异常处理
全局异常处理是一种在Spring Boot项目中处理抛出的异常的方法。通过使用@ControllerAdvice注解,我们可以创建一个全局异常处理类,该类可以拦截项目中抛出的异常并进行相应的处理。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [SpringBoot中的全局异常处理](https://blog.csdn.net/liyuuhuvnjjv/article/details/123372094)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [SpringBoot实现全局异常处理总结](https://blog.csdn.net/HongYu012/article/details/123276527)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文