如何在注册处理程序映射之前自动配置控制器?

时间:2018-04-18 07:39:51

标签: spring-boot

我正在创建一个自定义自动配置模块,它有一个实现ErrorController的自定义错误控制器。我需要在AbstractHandlerMethodMapping#initHandlerMethods之前实例化我的customErrorController实例,原因(我认为)与此无关。

我已经尝试@AutoConfigureBefore({WebMvcAutoConfiguration.class, ErrorMvcAutoConfiguration.class})没有运气,但在我的控制器实例化之前,它仍然有时点击initHandlerMethods

我应该在@AutoConfigureBefore中提供什么线索?

0 个答案:

没有答案
相关问题