Kaynağa Gözat

Pull in start and complete branch code into master branch.

Craig Walls 13 yıl önce
ebeveyn
işleme
35df3ba260

+ 2
- 6
README.md Dosyayı Görüntüle

@@ -3,17 +3,13 @@ Getting Started: Creating a REST Service
3 3
 
4 4
 This Getting Started guide will walk you through the process of creating a simple REST service using Spring.
5 5
 
6
-To help you get started, we've provided an initial project structure for you in GitHub:
6
+To help you get started, we've provided an initial project structure as well as the completed project for you in GitHub:
7 7
 
8 8
 ```sh
9 9
 $ git clone https://github.com/springframework-meta/gs-rest-service.git
10 10
 ```
11 11
 
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:
13
-
14
-```sh
15
-$ git clone -b completed https://github.com/springframework-meta/gs-rest-service.git
16
-```
12
+In the `start` folder, you'll find a bare project, ready for you to copy-n-paste code snippets from this document. In the `complete` folder, you'll find the complete project code.
17 13
 
18 14
 Before we can write the REST service itself, there's some initial project setup that's required. Or, you can skip straight to the [fun part]().
19 15
 

.gitignore → complete/.gitignore Dosyayı Görüntüle


build.gradle → complete/build.gradle Dosyayı Görüntüle


+ 1
- 0
complete/settings.gradle Dosyayı Görüntüle

@@ -0,0 +1 @@
1
+rootProject.name = 'gs-rest-service-complete'

src/main/java/hello/Greeting.java → complete/src/main/java/hello/Greeting.java Dosyayı Görüntüle


src/main/java/hello/HelloWorldConfiguration.java → complete/src/main/java/hello/HelloWorldConfiguration.java Dosyayı Görüntüle


src/main/java/hello/HelloWorldController.java → complete/src/main/java/hello/HelloWorldController.java Dosyayı Görüntüle


src/main/java/hello/HelloWorldWebAppInitializer.java → complete/src/main/java/hello/HelloWorldWebAppInitializer.java Dosyayı Görüntüle


+ 5
- 0
start/.gitignore Dosyayı Görüntüle

@@ -0,0 +1,5 @@
1
+.classpath
2
+.gradle/
3
+.project
4
+.settings/
5
+bin/

+ 16
- 0
start/build.gradle Dosyayı Görüntüle

@@ -0,0 +1,16 @@
1
+apply plugin: 'java'
2
+apply plugin: 'jetty'
3
+apply plugin: 'eclipse-wtp'
4
+apply plugin: 'idea'
5
+
6
+repositories { mavenCentral() }
7
+
8
+dependencies {
9
+	compile "org.springframework:spring-webmvc:3.2.2.RELEASE"
10
+	compile "com.fasterxml.jackson.core:jackson-core:2.1.4"
11
+	providedCompile "javax.servlet:servlet-api:2.5"
12
+}
13
+
14
+task wrapper(type: Wrapper) {
15
+	gradleVersion = '1.5'
16
+}

+ 1
- 0
start/settings.gradle Dosyayı Görüntüle

@@ -0,0 +1 @@
1
+rootProject.name = 'gs-rest-service-start'

+ 4
- 0
start/src/main/java/hello/Greeting.java Dosyayı Görüntüle

@@ -0,0 +1,4 @@
1
+package hello;
2
+
3
+public class Greeting {
4
+}

+ 4
- 0
start/src/main/java/hello/HelloWorldConfiguration.java Dosyayı Görüntüle

@@ -0,0 +1,4 @@
1
+package hello;
2
+
3
+public class HelloWorldConfiguration {
4
+} 

+ 4
- 0
start/src/main/java/hello/HelloWorldController.java Dosyayı Görüntüle

@@ -0,0 +1,4 @@
1
+package hello;
2
+
3
+public class HelloWorldController {
4
+}

+ 4
- 0
start/src/main/java/hello/HelloWorldWebAppInitializer.java Dosyayı Görüntüle

@@ -0,0 +1,4 @@
1
+package hello;
2
+
3
+public class HelloWorldWebAppInitializer {
4
+}