我正在使用基于 xml 的 spring 配置。我在 spring 文档中发现默认情况下启用了某些 bean。这是什么意思?以及如何解决该 bean 以更改其属性之一。我明白,如果我定义一个 bean,我可以在它的定义中配置它。但是现有的“默认启用”bean呢?
编辑:来自 org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver javadoc:
@Deprecated public class AnnotationMethodHandlerExceptionResolver
extends AbstractHandlerExceptionResolver Implementation of the
org.springframework.web.servlet.HandlerExceptionResolver interface
that handles exceptions through the ExceptionHandler annotation. This
exception resolver is enabled by default in the
org.springframework.web.servlet.DispatcherServlet.