Skip to content

newfound-systems/example-spring-RESTful-with-spring-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring RESTful CRUD Service using SpringBoot

Comprehensive Spring RESTful Server and Client Application with CRUD Service (inMemory). Contributors are most welcome and you are free to distribute and usage. Liked Sources, Just send Thanks to [NEWFOUND SYSTEMS (http://www.newfound-systems.com)]

Getting Started

Prerequisities

  • Basic understanding of Spring Framework which includes Spring Boot, Spring Security.
  • Understanding of JSON or XML.
  • How to Use Google Collections.

Technologies

  • JDK 1.7 and above
  • Maven 3+
  • Jackson Bind
  • Apache Tomcat 8+
  • Google Guava Collections
  • Advanced Rest Client as Chrome Extension or PostMan for REST Client Testing

Running the server

Spring Boot Main Class, Just run below class like any another Java Code

  • com.newfound.rest.server.app.RestServerApplication

Running the client

Run using Sample Java Client

  • com.newfound.rest.client.RestTemplateClient

Using browser for GET Method

Using Advanced REST Client or POSTMAN for POST Method

Sample Output (JSON Request)

{ "code" : 0, "message" : "SUCCESS", "persons" : [ { "id" : 1, "firstName" : "John", "lastName" : "Doe", "emailId" : "john.doe@somewhere.com", "gender" : "MALE", "salary" : 1000 } ] }

Sample Output (XML Request)

0 SUCCESS 1 John Doe john.doe@somewhere.com MALE 1000

Using CURL in LINUX for communications

$ curl --basic --user admin:admin --request GET http://localhost:8080/person/find/id/1.json

$ curl --basic --user admin:admin --request POST http://localhost:8080/person/create

Running on https

You can uncomment src/main/resources/application.properties to run secured service enabled

Versioning

We use [Apache Subversion (https://subversion.apache.org/)] for versioning.

Authors

License

This project is licensed under the Open Free for all License.

Acknowledgments

About

Spring RESTful with Spring Boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published