Skip to content
A multi-project Spring MVC example with gradle
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
spring-app
.gitignore
LICENSE
README.md

README.md

springmvc-architecture-gradle

A multi-project Spring MVC example with gradle

This is a Spring MVC web application example based on the spring-architecture-gradle project.

How to Import into Eclipse

  • File -> Import... -> Gradle -> Gradle Project
  • Click Next
  • Click Browse... for the Root Directory
  • Select and open spring-app
  • Click Build Model
  • Select all projects
  • Click Finish

Notes:

Building

You can run:

gradle build

Or if you are behind a proxy:

gradle -Dhttp.proxyHost=proxy.address -Dhttp.proxyPort=80 -Dhttp.proxyUser=myusername -Dhttp.proxyPassword=mypassword build

###Replacing Dao implementations The project as it is uses the Dummy Dao implementation. To use the the Jdbc or Hibernate implementation just change the build.gradle file of the spring-app-service project from:

description = 'spring-app-service'
dependencies {
  . . .
  compile project(':spring-app-dao-dummy')
  . . .
}

to

description = 'spring-app-service'
dependencies {
  . . .
  compile project(':spring-app-dao-jdbc')
  . . .
}

or

description = 'spring-app-service'
dependencies {
  . . .
  compile project(':spring-app-dao-hibernate')
  . . .
}

and run gradle clean and gradle build on spring-app or refresh all projects in your IDE.

Deployment

Deployment of spring-app-presentation to a local Tomcat can be accessed through: http://127.0.0.1:8080/spring-app-presentation/book

References

Gradle Java plugin
Gradle Maven plugin
Gradle Eclipse plugin
Gradle Idea plugin

You can’t perform that action at this time.