The contact application has a DAO module, WS (Web Service) Beans module, Services module, REST Services module, Web Application module, and a shared test module.
The DAO module contains the schema, JPA entities, and uses Spring Data JPA repositories. It uses Spring Profiles to have either an HSQL or PostgreSQL JDBC connection.
The Services module is to contain any business logic. All of it's APIs use JAXB beans and Dozer is used to convert between this beans and the JPA entities. Security and transactions are configured in this layer.
The REST Services module contains the REST clients & controllers, as well as their Spring configurations. JSON and XML views are supported for requests. The Jackson JSON Processor is used for JSON marshalling. It has the standard JSON media type and a custom one that also includes class information for more complex data models.
The DAO, Services, and REST Services all have an abstract test class for each module that each test extends. This way within each module, all tests have a shared context so Spring only has to load once. All of these tests use an in memory database and the REST Services have an embedded jetty server. REST Services tests can be run with clients using JSON or XML for marshalling.