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