java.lang.NoSuchMethodError: org.springframework.web.accept.ContentNegotiationManager.getMediaTypeMappings() (spring 5.2.4+)


org.springframework.web.servlet.resource.ResourceHttpRequestHandler.setContentNegotiationManager(ContentNegotiationManager)

as of 5.2.4 in favor of using ResourceHttpRequestHandler.setMediaTypes(Map) with mappings possibly obtained from ContentNegotiationManager.getMediaTypeMappings().
 
SpringMVC访问静态资源
 
    <mvc:resources mapping="/wav/**" location="/wav/" />
    <mvc:resources mapping="/images/**" location="/images/" />
    <mvc:resources mapping="/include/**" location="/include/" />
    <mvc:resources mapping="/js/**" location="/js/" />
    <mvc:resources mapping="/css/**" location="/css/" />
    <mvc:resources mapping="/html/**" location="/html/" />
    <mvc:resources mapping="/fonts/**" location="/fonts/" ></mvc:resources>
    <mvc:resources mapping="/plugins/**" location="/plugins/" />
    <mvc:resources mapping="/cordova-js-src/**" location="/cordova-js-src/" />
    <mvc:resources mapping="/*.html" location="/" />
    <mvc:resources mapping="/*.js" location="/" />
    <mvc:resources mapping="/**/*.html" location="/"/>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM