Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Spring MVC support versioning of static assets (css, js and images )

Does Spring MVC support versioning of static assets (css, js and images ) by appending the last-modified-date to the asset file names which effectively serves, caches, and invalidates the assets automatically ?

Rails supports this by using the asset_tag helpers.

I want to add the last-modified-date attribute of a file as a query parameter to serve static assets from the server, so that if I modify the static files (css, js, images) I do not have to modify my code and cache invalidation can happen automatically.

thank you

like image 268
Santhosh S Avatar asked Oct 25 '22 21:10

Santhosh S


1 Answers

Yes, check the spring MVC documentation, section 17.15.6 Configuring Serving of Resources

like image 69
Bozho Avatar answered Nov 15 '22 09:11

Bozho