Static Resources Minification in a Spring 4 Website with Wro4j

The project linked here is a minimal and up-to-date Spring 4 website with pure Java configuration. I'm not including any snippets in the post because the code is already trivially easy to adapt, and there's not much other than the wro4j bits and the Spring boilerplate skeleton.

I had some trouble finding any such minimal (and up-to-date, correct and complete) example elsewhere that can be adapted to a Spring webapp with Java configuration with little hassle, so I believe this will be useful.

At the time of writing this post, if I start a new project with Spring 4, pure Java configuration and ECMAScript 2015 (aka ES6) for the front end. I cannot use either of the two most popular maven minification plugins, which simply do not work well with ES6 features. This will possibly be fixed sometime in the future since they are currently under active development.

https://bitbucket.org/jubbat/awebapp/src

Comments