How to access static resources when mapping a global front controller servlet on /*

前端 未结 19 2350
轮回少年
轮回少年 2020-11-22 07:35

I\'ve mapped the Spring MVC dispatcher as a global front controller servlet on /*.

               


        
19条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 08:10

    I've run into this also and never found a great solution. I ended up mapping my servlet one level higher in the URL hierarchy:

           
      home             
      /app/*     
    
    

    And now everything at the base context (and in your /res directory) can be served up by your container.

提交回复
热议问题