Posts

Showing posts from 2012

HOW-TO: Improve content assist for types with static members while creating JUnit tests in Eclipse

Image
Usually while creating JUnit tests we statically import org.junit.Assert , org.hamcrest.Matchers , org.mockito.Mockito , org.mockito.Matchers when we want to use static members of these types. To make that Eclipse proposes members of mentioned types (or any other) without explicit static import we need to define the list in Eclipse's content assist configuration

HOW-TO: Method-level validation in Spring with @Validated annotation

@Validated is a Spring’s specific variant of JSR-303’s javax.validation.Valid, supporting the specification of validation groups. @Validated can be used with Spring MVC handler methods arguments as well as with method level validation. In this article, you will learn how to use @Validated annotation with method level validation in Spring.

Spring MVC 3.1 Quickstart Maven Archetype

Spring 3.1 brings many enhancements to its MVC framework. Many times I need to start some basic project to consult new things on the project for the presentation, blog post or just for myself. In order to make the creation of each project repeatable and easy process I decided to create Maven archetype for that puropose. Currently it is a snapshot version that support basic Spring MVC 3.1 project with JPA2.0 and Apache Tiles. See more details on the spring-mvc-quickstart-archetype project page how to get started with it . If you have any suggestions or you would like to join this project, please let me know.