类的使用
org.springframework.web.bind.annotation.ControllerAdvice
使用ControllerAdvice的程序包 程序包 说明 org.springframework.web.bind.annotation Annotations for binding requests to controllers and handler methods as well as for binding request parameters to method arguments.org.springframework.web.method Common infrastructure for handler method processing, as used by Spring MVC'sorg.springframework.web.servlet.mvc.method
package.org.springframework.web.bind.annotation中ControllerAdvice的使用
注释类型为ControllerAdvice的org.springframework.web.bind.annotation中的类 修饰符和类型 类 说明 interface
RestControllerAdvice
A convenience annotation that is itself annotated with@ControllerAdvice
and@ResponseBody
.org.springframework.web.method中ControllerAdvice的使用
参数类型为ControllerAdvice的org.springframework.web.method中的构造器 构造器 说明 ControllerAdviceBean(String beanName, BeanFactory beanFactory, ControllerAdvice controllerAdvice)
Create aControllerAdviceBean
using the given bean name,BeanFactory
, and@ControllerAdvice
annotation.