2017-09-05 55 views
0

在Spring引导应用程序中给出我有一个WebMvc配置,它扩展了WebMvcConfigurationSupportSpring Cloud Consul导致注销ServletContext

当我添加一个依赖于:

org.springframework.cloud:spring-cloud-starter-consul-discovery:1.2.1.RELEASE

然后我得到:

工厂方法'defaultServletHandlerMapping'抛出异常;嵌套0​​例外是java.lang.IllegalArgumentException异常:配置默认的servlet处理

任何提示ServletContext的需要 ?

谢谢!

回答

0

扩展WebMvcConfigurerAdapter改为修复它。