A very good post on Spring java configuration

https://samerabdelkafi.wordpress.com/2014/08/03/spring-mvc-full-java-based-config/