0

My project is implemented in Spring3 and configuration is almost xml. Configuration of static resource mapping is like below:

<mvc:resources mapping="/a/**" location="file:/data/a/"/>

There is no problem when accessing /a/xxx.jpg but 404 Error is occurred when accessing subdirectory like /a/b/yyy.jpg. There is no problem about access authority of filesystem. How can I solve this problem? Additional configuration is needed?

(Add) Project directory is fine, but filesystem directory does not work

DAIRAV
  • 723
  • 1
  • 9
  • 31
firia2000
  • 1,773
  • 5
  • 19
  • 20

1 Answers1

0

Use something like below :

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

You can specify classpath also to location any particular folder like below.

<mvc:resources location="/, classpath:/META-INF/web-resources/" mapping="/resources/**"/>
Alien
  • 15,141
  • 6
  • 37
  • 57