Difference between WebMvcConfigurationSupport and WebMvcConfigurerAdapter

前端 未结 4 1811
我在风中等你
我在风中等你 2020-12-23 16:59

I would like to add resource handlers. In the forum they use WebMvcConfigurationSupport: http://forum.springsource.org/showthread.php?116068-How-to-configure-lt

4条回答
  •  旧时难觅i
    2020-12-23 17:47

    The answer is in the doc you referenced above:

    If the customization options of WebMvcConfigurer do not expose something you need to configure, consider removing the @EnableWebMvc annotation and extending directly from WebMvcConfigurationSupport overriding selected @Bean methods

    In short, if @EnableWebMvc works for you, there is no need to look any further.

提交回复
热议问题