Minification of JS and CSS Assets with Maven 1. Overview This article shows how to minify Javascript and CSS assets as a build step and serve the resulting files with Spring MVC. We will use YUI Compressor as the underlying minification library and YUI Compressor Maven plugin to integrate it… Continue Reading maven-minification-of-js-and-css-assets

Flattening Nested Collections in Java 1. Overview In this quick article, we’ll explore how to flatten a nested collection in Java. 2. Example of a Nested Collection Suppose we have a list of lists of type String. List<List<String>> nestedList = asList( asList(“one:one”), asList(“two:one”, “two:two”, “two:three”), asList(“three:one”, “three:two”, “three:three”, “three:four”)); 3.… Continue Reading java-flatten-nested-collections

Round Up to the Nearest Hundred 1. Overview In this quick tutorial, we’ll illustrate how to round up a given number to the nearest hundred. For example: 99 becomes 100 200.2 becomes 300 400 becomes 400 2. Implementation First, we’re going to call Math.ceil() on the input parameter. Math.ceil() returns the smallest integer… Continue Reading java-round-up-nearest-hundred