EloiBilek / ApiSpringGradleMongo

API example Monolithic using Spring, Gradle and MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Title Description Author Tags Created
ApiSpringGradleMongo
API example using Spring, Gradle and MongDB
Eloi Bilek
gradle, restful, api, java, spring, mongodb
2016 Abr 11

ApiSpringGradleMongo

==============================

It 's a very simple example of an RestFul API, CRUD of User. Using:

  • Java 8
  • Gradle 2.12
  • Spring 4
  • MongoDB 3.2.4
  • Tomcat 8
  • Eclipse Java EE IDE - Version: Mars.1 Release (4.5.1)

Note 1!

This project was started with: New > Gradle > Project Gradle.

init project

Using the plugin (Add in Eclipse Marketplace).

gradle plugin

To run the project in Tomcat server linked in Eclipse, set the Project Facets in: ApiSpringGradleMongo > Properties > Project Facets.

facets

... And add external dependencies on: ApiSpringGradleMongo > Properties > Deployment Assembly.

facets

After importing the project to the Eclipse workspace, run build in: ApiSpringGradleMongo > Gradle > Refresh Gradle Project. Or select task (assemble, build...) in Gradle Tasks perspective.

gradle tasks

In Tomcat server, add the project, click Publish, make sure synchronized. Start with Play or Debug.

To test requests (post, get, put and delete), I use the following plugin for chrome:

rest plugin

Request example.

request test

Response example.

response test

About

API example Monolithic using Spring, Gradle and MongoDB


Languages

Language:Java 100.0%