Writing your own Spring Boot starter: wro4j-spring-boot-starter

Optimizing web resources with wro4j and Spring and revisited
February 2, 2016 by Michael

I’ve been using Wro4j by Alex Objelean for more than 4 years now in a “classic” Spring application, see my post from January 2012 here. The tool has been immensely useful and stable. With my setup at dailyfratze.de, i can disable concatenation and minification during development and have optimized resources during production without much hassle.

Spring Boot is around for nearly 2 years now as well and i used it extensively, on my private projects, for my JUG and also in my company.

There are a lot of really useful starters out there, see the complete list here and i decided to add my own:

The wro4j-spring-boot-starter

Go to the Github project for a full description and short manual on how to use this. The binaries should be in Maven central under the following coordinates:


I’ve been using the basic code now for 2 months, on the mentioned JUG site and in my company and as always, the Spring Eco system proved to be extremely stable and the people around extremely helpful.

I took the joy to inflect Springs check style settings onto my as Andy pointed out and wrote the starter under the spring-boot-starter-parent which is kinda brutal but gives a very welcome different view on code quality. Furthermore i tried to reach a good test coverage.

The starter will be used in my Spring Boot demo application as well as soon as i have fixed the AngularJS code which is a bit sensitive agains minification.

My favorite toy project, the AngularJS application biking2, based on Spring Boot, has now fully optimized web resources, see this commit.

Together with WebJars, Maven and application properties, Wro4j and now this starter are my preferred tools to stay in control of JavaScript dependencies without resorting to all kinds of package managers. Last year i hoped to be able to speak about that stuff at the JavaLand newcomer track but that didn’t work out. Maybe another conference or JUG and time.

Thanks a lot to my company ENERKO Informatik GmbH for providing the resources to work on that stuff.

Update: Thanks a lot Josh for adding this little starter to This Week in Spring – February 9th, 2016.

No comments yet

Post a Comment

Your email is never published. We need your name and email address only for verifying a legitimate comment. For more information, a copy of your saved data or a request to delete any data under this address, please send a short notice to michael@simons.ac from the address you used to comment on this entry.
By entering and submitting a comment, wether with or without name or email address, you'll agree that all data you have entered including your IP address will be checked and stored for a limited time by Automattic Inc., 60 29th Street #343, San Francisco, CA 94110-4929, USA. only for the purpose of avoiding spam. You can deny further storage of your data by sending an email to support@wordpress.com, with subject “Deletion of Data stored by Akismet”.
Required fields are marked *