Skip to content
프로젝트

소개

더 강력한 REST API 구축에 관한 발표 자료

기타 프로젝트

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

The Spring REST Stack

This code accompanies a talk that I deliver on RESTful service development with Spring.

The goals of this project are to demonstrate the development of a simple REST service with Spring. The REST service concerns itself with the domain of a simple CRM: a user manages a customer collection.

Breakdown of the Various Tiers

The Data and Service Tier

The data tier module services uses Spring Data JPA repositories, a standard SQL database, and Spring's standard transaction management infrastructure to build a service. This tier is configured by importing the class com.jl.crm.services.ServiceConfiguration. Currently there are two Spring profiles. One called production, which attempts to the SQL database configured in /code/services/src/main/resources/config.properties, and test, which manages an embedded H2 database which can be accessed at the embedded H2 database console web application with the configuration shown below.

H2 database console

The REST Tier

There are four web-tier modules, rest, hateoas, hateoas-data, and oauth, which demonstrate the evolution of a REST service implemented using Spring MVC to manage users and customers. The initial cut, rest, is fairly RESTful, but not HATEOAS and hypermedia compliant. The next cut, hateoas uses Spring HATEOAS to introduce hypermedia. This improvement, while welcome, is not without an associated cost in code. The next cut, hateoas-data, introduces [Spring Data REST](https://github.com/SpringSource/Spring-Data-REST) which reduces boilerplate code associated with managing data from the REST endpoint to the database. In the final cut, oauth, we introduce Spring Security and Spring Security OAuth to secure the API's from both prying eyes and unauthorized application clients.

The Client Tier

The social module is a Spring Social API binding for the OAuth 2.0-secured CRM REST API. The ClientExample demonstrates how to configure and use the Spring Social binding outside of a web container and demonstrates some of its uses.

The android module is a Spring Android-powered Android client that embeds the social client and uses it to support an Android mobile application.

Notes on Implementation

For a detailed walkthrough of all the code, please check out the tutorial.

관련 프로젝트 살펴보기

불러오는 중…