RouterHandlerMapping declaration has changed. "servletPrefix" configuration is now useless and so you should remove that part from your *-servlet.xml.
<property name="servletPrefix" value="foobar" />
This is now done automatically for you at runtime, for the context path and the servlet path.
If you want full Javaconfig support - for example, adding interceptors by implementing WebMvcConfigurer methods:
- you SHOULD NOT use the @EnableWebMvc annotation
- you SHOULD make your javaconfig class extend RouterConfigurationSupport
- no need to declare springmvc-router related beans in XMLs :-D