Spring Framework 4.0 Sample application

15,107

Solution 1

Spring Guides

Take look at Spring Guides, all with Spring 4.0.

(..) these guides are designed to get you productive as quickly as possible – using the latest Spring project releases and techniques as recommended by the Spring team.

I think tutorial Data Access with Spring can help you, especially step 3:

with source code: https://github.com/spring-guides/tut-data

There is also Getting Started Guide, designed to be completed in 15-30 minutes

with source code: https://github.com/spring-guides/gs-accessing-data-jpa.

This give you general look at possibilites. You can use solutions from this (like Spring Data JPA etc) with or without Spring Boot.

Appfuse archetypes

There is also Appfuse 3.0 recently released with support for Spring 4.0.

AppFuse is a full-stack framework for building web applications on the JVM. It was originally developed to eliminate the ramp-up time when building new web applications. Over the years, it has matured into a very testable and secure system for creating Java-based webapps.

AppFuse is full of good patterns, simply build new project from appfuse archetype and take look.

Solution 2

There is also an interesting project that helps you to bootstrap your spring app as easy and fast as possible. You probably would like to take a look. Spring Boot

Solution 3

If you are looking for normal application (not a web application but integration of Spring 4 with hibernate 4) then you can refer to My Blog. If you are interested in further integrate the same to Spring MVC you need to create controller class with annotation @Controller and autowire the same to respective Service class via @Service annotation.

Share:
15,107

Related videos on Youtube

Thom
Author by

Thom

Seasoned software architect building mobile word games for himself. Background in web services and Spring Framework.

Updated on June 04, 2022

Comments

  • Thom
    Thom over 1 year

    I haven't kept up with all of the changes to the spring framework since 2.5. I am looking for a sample application for 4.0 that has a basic skeleton app with hibernate done the 4.0 way with controllers and services.

    I've googled and looked at the spring site, which I think has been made much worse in the last year or so. Can anyone help me out?