当spring抛出异常时出现的页面的@ExceptionHandler(RuntimeException.class) 用法

主要用在Controller层

  @ExceptionHandler(RuntimeException.class) 
      public String ex() {
          //这个是当spring跑出异常时出现的页面
        return "redirect:/unauthorized.jsp";
      }

 

相关文章:

  • 2021-09-22
  • 2022-12-23
  • 2021-05-05
  • 2021-05-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-12
  • 2021-09-10
  • 2021-12-30
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案