소스 검색

Edits to initial text

Craig Walls 13 년 전
부모
커밋
f1f6ccaede
1개의 변경된 파일14개의 추가작업 그리고 17개의 파일을 삭제
  1. 14
    17
      gs-rest-service.md

+ 14
- 17
gs-rest-service.md 파일 보기

@@ -3,31 +3,28 @@ Getting Started: Creating a REST Endpoint
3 3
 
4 4
 This Getting Started guide will walk you through the process of creating a simple REST endpoint using Spring.
5 5
 
6
-Setting Up Gradle
7
------------------
8
-We recommend you use Gradle for your Spring projects. If you’re a big Ant / Ivy, Buildr, Gradle, SBT, Leiningen, or Gant fan, that’s cool, but we use Gradle and we’ll be using Gradle in this guide. If you have any questions about how Gradle works, Building and Testing with Gradle (O'Reilly) should have what you’re looking for. (We’re assuming you know how to create a new Gradle project. If not, you can use this to get started.)
6
+To help you get started, we've provided an initial project structure for you in GitHub:
9 7
 
10
-The following build.gradle file has everything we'll need for our project.
11
-
12
-```groovy
13
-apply plugin: 'java'
14
-apply plugin: 'jetty'
8
+```sh
9
+$ git clone git://github.com/SpringSource/gs-rest-service.git
10
+```
15 11
 
16
-repositories { mavenCentral() }
12
+As you work through this guide, you can fill in this project with the code necessary to complete the guide. Or, if you'd prefer to see the end result, the completed project is available in the *completed* branch of the Git repository:
17 13
 
18
-dependencies {
19
-	compile "org.springframework:spring-webmvc:3.2.2.RELEASE"
20
-	compile "org.codehaus.jackson:jackson-mapper-asl:1.9.9"
21
-	providedCompile "javax.servlet:servlet-api:2.5"
22
-}
14
+```sh
15
+$ git clone -b completed git://github.com/SpringSource/gs-rest-service.git
23 16
 ```
24 17
 
25
-Spring's REST support is based on Spring MVC. Therefore, we must add spring-webmvc as a dependency to our project. Also, so that our endpoints can produce JSON output, we needed to include the Jackson JSON library. And, since we'll be working with code that depends on the Servlet API, we'll need the Servlet API (as a providedCompile dependency for compile-time purposes only).
18
+Before we can write the REST endpoint itself, there's some initial project setup that's required. Or, you can skip straight to the [fun part]().
26 19
 
27
-Each of these dependencies have dependencies of their own that will transitively be resolved.
20
+Selecting Dependencies
21
+----------------------
22
+The sample in this Getting Started Guide will leverage Spring MVC and the Jackson JSON processor. Therefore, you'll need to declare the following library dependencies in your build:
28 23
 
29
-We've also included the 'jetty' plugin so that we can easily run and test our code via Gradle.
24
+  - org.springframework:spring-webmvc:3.2.2.RELEASE
25
+  - org.codehaus.jackson:jackson-mapper-asl:1.9.9
30 26
 
27
+Click here for details on how to map these dependencies to your specific build tool.
31 28
 
32 29
 Setting Up DispatcherServlet
33 30
 ----------------------------