0
<mvc:resources location="/images/" mapping="/images/**"/>
<mvc:resources location="/css/" mapping="/css/**"/>
<mvc:resources location="/styles/" mapping="/styles/**"/>
<mvc:resources location="/js/" mapping="/js/**"/>

This is the basic configuration of springMVC in order to load static resources. Now there is a problem that a calendar plugin only need my importing js and when project deployed, the js code generate a css file in webapp/js/theme directory. When visiting the website, there is a 404 error of css. So how am I supposed to set this configuration to solve this problem?

1 Answer 1

1

Please try using below code :

<mvc:resources location="/" mapping="/resources/**"/>

If above solution doesn't work then use below code (adding classpath to load) :

<mvc:resources location="/, classpath:/META-INF/web-resources/" mapping="/resources/**"/>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.