springboot中mvc自动配置中配置了一个BasicErrorController,BasicErrorController默认处理/error请求,现在想知道发生异常之后是怎么跳转到/error这个接口的。

@Controller
@RequestMapping("${server.error.path:${error.path:/error}}")
public class BasicErrorController extends AbstractErrorController {

跳转到/error接口,默认情况下是由tomcat容器中的org.apache.catalina.core.StandardHostValve类的custom()方法完成的。并不是由springboot完成的。

springboot是如何跳转到/error接口的

 

本篇文章参考了:https://blog.csdn.net/chezhi7609/article/details/100639407

相关文章:

  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2021-11-26
  • 2021-12-04
  • 2021-07-16
猜你喜欢
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2023-02-02
  • 2021-08-18
  • 2021-11-22
相关资源
相似解决方案