Skip to content

Chicker/spring-rest-loan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This project shows how to use different enterprise libraries together in the Spring framework based project.

This project is a RESTful service implemented in Spring Web MVC.

The service is divided in several layers:

  • REST API (Spring Web MVC)
  • Services Layer (some functionality use RxJava)
  • Data Access Layer (Spring Data JPA, Hibernate as ORM)
  • Database system (H2 was used for testing, and MySql or Postgres may be used in production)

The documentation for REST API can be find here.

Development

This is a gradle-based project.

Running

Using gradle plugin gretty allows run our web application with jetty (or another servlet container) runner. Gradle task for this:

./gradlew [appRun | jettyRun]

Testing

The service layer is tested with JUnit and Mockito.

REST API is tested with Spring Mvc Test Framework.

All the tests use H2 database system.

Deployment

To generate war file execute following command:

./gradlew war

The war file will be placed in /build/libs/ folder.

About

This is a sample of the RESTful service that shows how to use Spring MVC + Hibernate and how to test it all.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages