Spring and Hibernate Development

The Spring Framework is one of the leading lightweight architectures for creating enterprise-scale applications in Java. Hibernate is a popular object-relational mapping tool, and is well-suited to Spring-based solutions. This course provides thorough coverage of both technologies, and shows how they can be used together effectively.

You will learn how to use Spring to create enterprise-scale components including Web applications, Web services, data-access components, and messaging components. You will also learn how to use Hibernate to map Java classes to databases, and how to execute queries using a variety of techniques.


5 days



  • At least 6 months Java programming experience
  • Familiarity with relational databases and SQL

What you'll learn

  • Creating and using Spring beans
  • Implementing dependency injection
  • Using Spring data access and transaction APIs
  • Creating Spring MVC Web applications
  • Defining and using Web services using Spring
  • Understand Hibernate mapping and API choices
  • Mapping classes to tables
  • Using JPA and/or HQL to query entities
  • Mapping associations

Course details

Spring Framework - Essentials

  • Overview of Spring
  • Dependency injection and Inversion of Control (IoC)
  • Aspect-Oriented Programming (AOP) with Spring
  • Test-Driven Development principles
  • Defining a first application

Using Inversion of Control (IoC)

  • Implementing IoC in Spring
  • Implementing dependency injection via beans and bean factories
  • Spring bean definition profiles and environments

More about Spring Bean Configuration

  • Property editors
  • Type converters
  • Autowiring and component scanning
  • Spring Expression Language
  • Spring unified property management
  • Bean definition profiles
  • Caching

Java-Based Bean Configuration

  • Using the @Configuration annotation
  • Dependency injection in Java-based configuration
  • Using Spring support for XML namespaces in Java-based configuration
  • Accessing properties

Understanding the Application Context Lifecycle

  • Bean factory post processing
  • Bean post processing
  • Implementing @PostConstruct and @PreDestroy methods
  • Understanding dynamic proxies

Aspect-Oriented Programming (AOP)

  • Spring AOP architecture
  • Defining pointcuts
  • Defining joinpoints
  • Implementing advice methods
  • Understanding pointcut designators
  • Implementing introductions

Spring Data Access

  • Spring data access concepts
  • JdbcTemplate
  • Spring repositories and application architecture
  • JPA integration
  • Hibernate integration

Spring Transactions

  • Local vs. global transactions
  • Understanding PlatformTransactionManager
  • Declarative transactions
  • @Transactional
  • Advising transactions
  • Roll-backs
  • Bean-specific transactions

Creating Web Applications with Spring Web MVC

  • Overview of MVC
  • Spring MVC implementation
  • Configuring a dispatcher servlet
  • Defining a controller
  • Mapping request parameters
  • Mapping path variables
  • Accessing HTTP cookies, headers, and session state

Going Further with Spring Web MVC

  • Form handing
  • Formatting
  • Validation
  • Java-based MVC configuration
  • Ajax support
  • Asynchronous requests

Spring Web Services

  • Hosting SOAP web services in Spring
  • Implementing RESTful services
  • Using Spring REST annotations
  • Implementing RESTful clients

Getting Started with Hibernate

  • Object-relational mapping (ORM) concepts and issues
  • Overview of mapping
  • Introduction to HQL and JPA

Query Techniques

  • Finding objects by primary key
  • Querying for entities
  • Using functions
  • Ordering, paging, and filtering
  • Projections
  • Handling simple associations
  • Named queries

Mapping Classes by using Annotations

  • Getting ready for annotations
  • Using annotations
  • Strategies for generating IDs
  • Embedded objects

Managing Entities

  • Entity states
  • Managing attached entities
  • Managing detached entities

Mapping Associations

  • Relationships and associations
  • Defining 1-1 associations
  • Defining 1-many associations
  • Defining many-many associations
  • Defining join classes
  • Cascading