Home » Tag Archives: Spring (page 82)

Tag Archives: Spring

The persistence layer with Spring 3.1 and Hibernate

1. Overview This article will show how to implement the DAO with Spring and Hibernate. For the core Hibernate configuration, see the articles about Hibernate 3 and Hibernate 4 with Spring. 2. No More Spring Templates Starting Spring 3.0 and Hibernate 3.0.1, the Spring HibernateTemplate is no longer necessary to manage the Hibernate Session. It is now possible to make ...

Read More »

Configure LogBack Logging with Spring

LogBack is an API for logging created by the same author of Log4j (a newer implementation, it is like a new version), during this article I’m going to show how to integrate it and use it on a Spring project. On this tutorial I assume you are using a simple Spring ROO project which will prepare all the structure of ...

Read More »

Transaction configuration with JPA and Spring 3.1

spring-interview-questions-answers

1. Overview This tutorial will discuss the right way to configure Spring Transactions, use the @Transactional annotation and common pitfalls. For a more in depth discussion on the core persistence configuration, check out the Spring with JPA tutorial. There are two distinct ways to configure Transactions – annotations and AOP – each with their own advantages – we’re going to ...

Read More »

Simplifying the Data Access Layer with Spring and Java Generics

spring-interview-questions-answers

1. Overview This article will focus on simplifying the DAO layer by using a single, generified Data Access Object for all entities in the system, which will result in elegant data access, with no unnecessary clutter or verbosity. 2. The Hibernate and JPA DAOs Most production codebases have some kind of DAO layer. Usually the implementation ranges from multiple classes ...

Read More »

The Persistence Layer with Spring Data JPA

spring-interview-questions-answers

1. Overview This article will focus on the configuration and implementation of the persistence layer with Spring 3.1, JPA and Spring Data. For a step by step introduction about setting up the Spring context using Java based configuration and the basic Maven pom for the project, see this article. The Persistence with Spring series:       Part 1 – ...

Read More »

The Persistence Layer with Spring 3.1 and JPA

1. Overview This is tutorial shows how to set up Spring with JPA, using Hibernate as a persistence provider. For a step by step introduction about setting up the Spring context using Java based configuration and the basic Maven pom for the project, see this article. 2. The JPA Spring Configuration with Java To use JPA in a Spring project, ...

Read More »

Spring Pitfalls: Transactional tests considered harmful

spring-interview-questions-answers

One of the Spring killer-features is an in-container integration testing. While EJB lacked this functionality for many years (Java EE 6 finally addresses this, however I haven’t, ekhem, tested it), Spring from the very beginning allowed you to test the full stack, starting from web tier, through services all the way down to the database. Database is the problematic part. ...

Read More »

REST Service Discoverability with Spring, part 5

spring-interview-questions-answers

This is the fifth of a series of articles about setting up a secure RESTful Web Service using Spring 3.1 and Spring Security 3.1 with Java based configuration. The previous article introduced the concept of Discoverability for the RESTful service, HATEOAS and followed with some practical scenarios driven by tests. This article will focus on the actual implementation of discoverability ...

Read More »

RESTful Web Service Discoverability, part 4

spring-interview-questions-answers

This is the fourth of a series of articles about setting up a secure RESTful Web Service using Spring 3.1 and Spring Security 3.1 with Java based configuration. The article will focus on Discoverability of the REST API, HATEOAS and practical scenarios driven by tests. Introducing REST Discoverability Discoverability of an API is a topic that doesn’t get enough well ...

Read More »