Spring Cloud Consul causes deregistration of ServletContext

75 views Asked by At

Giving in a spring boot application I have a WebMvc configuration which extends WebMvcConfigurationSupport.

When I add a dependency to:

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

Then I get:

Factory method 'defaultServletHandlerMapping' threw exception; nested exception is java.lang.IllegalArgumentException: A ServletContext is required to configure default servlet handling

Any hints?

Thank you!

1

There are 1 answers

0
Ask4Gilles On BEST ANSWER

Extending from WebMvcConfigurerAdapter instead, fixed it.