How to handle static content in Spring MVC?

前端 未结 23 2487
春和景丽
春和景丽 2020-11-22 03:28

I am developing a webapp using Spring MVC 3 and have the DispatcherServlet catching all requests to \'/\' like so (web.xml):

  
          


        
23条回答
  •  囚心锁ツ
    2020-11-22 03:47

    I got the same problem and found Joris's answer very helpful. But additionally I need to add

     
    

    to the servlet config file. Without that resource mapping will not work and all handlers will stop working. Hope this will help someone.

提交回复
热议问题