From f9c3aa9e938ccb94ededfb4669d8ae63c04db9ff Mon Sep 17 00:00:00 2001 From: didi Date: Fri, 2 Jun 2017 00:30:58 +0800 Subject: [PATCH] =?UTF-8?q?/info=E7=AB=AF=E7=82=B9=E8=BE=93=E5=87=BAGit?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Chapter6-2-1/pom.xml | 69 +++++++++++++++++++ .../main/java/com/didispace/Application.java | 22 ++++++ .../com/didispace/web/HelloController.java | 21 ++++++ .../src/main/resources/application.properties | 1 + .../java/com/didispace/ApplicationTests.java | 22 ++++++ 5 files changed, 135 insertions(+) create mode 100644 Chapter6-2-1/pom.xml create mode 100644 Chapter6-2-1/src/main/java/com/didispace/Application.java create mode 100644 Chapter6-2-1/src/main/java/com/didispace/web/HelloController.java create mode 100644 Chapter6-2-1/src/main/resources/application.properties create mode 100644 Chapter6-2-1/src/test/java/com/didispace/ApplicationTests.java diff --git a/Chapter6-2-1/pom.xml b/Chapter6-2-1/pom.xml new file mode 100644 index 0000000..c5b07cf --- /dev/null +++ b/Chapter6-2-1/pom.xml @@ -0,0 +1,69 @@ + + + 4.0.0 + + com.didispace + Chapter6-2-1 + 1.0.0 + jar + + Chapter6-2-1 + + + + org.springframework.boot + spring-boot-starter-parent + 1.5.3.RELEASE + + + + + UTF-8 + 1.8 + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-actuator + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + pl.project13.maven + git-commit-id-plugin + 2.1.15 + + + + revision + + + + + ${project.basedir}/.git + + + + + + \ No newline at end of file diff --git a/Chapter6-2-1/src/main/java/com/didispace/Application.java b/Chapter6-2-1/src/main/java/com/didispace/Application.java new file mode 100644 index 0000000..f7a9e16 --- /dev/null +++ b/Chapter6-2-1/src/main/java/com/didispace/Application.java @@ -0,0 +1,22 @@ +package com.didispace; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * + * @author 程序猿DD + * @version 1.0.0 + * @blog http://blog.didispace.com + * + */ +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + + SpringApplication.run(Application.class, args); + + } + +} diff --git a/Chapter6-2-1/src/main/java/com/didispace/web/HelloController.java b/Chapter6-2-1/src/main/java/com/didispace/web/HelloController.java new file mode 100644 index 0000000..58c767e --- /dev/null +++ b/Chapter6-2-1/src/main/java/com/didispace/web/HelloController.java @@ -0,0 +1,21 @@ +package com.didispace.web; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * + * @author 程序猿DD + * @version 1.0.0 + * @blog http://blog.didispace.com + * + */ +@RestController +public class HelloController { + + @RequestMapping("/hello") + public String index() { + return "Hello World"; + } + +} \ No newline at end of file diff --git a/Chapter6-2-1/src/main/resources/application.properties b/Chapter6-2-1/src/main/resources/application.properties new file mode 100644 index 0000000..c950800 --- /dev/null +++ b/Chapter6-2-1/src/main/resources/application.properties @@ -0,0 +1 @@ +#management.info.git.mode=full \ No newline at end of file diff --git a/Chapter6-2-1/src/test/java/com/didispace/ApplicationTests.java b/Chapter6-2-1/src/test/java/com/didispace/ApplicationTests.java new file mode 100644 index 0000000..62cd38e --- /dev/null +++ b/Chapter6-2-1/src/test/java/com/didispace/ApplicationTests.java @@ -0,0 +1,22 @@ +package com.didispace; + +import org.junit.Test; +import org.springframework.boot.test.context.SpringBootTest; + + +/** + * + * @author 程序猿DD + * @version 1.0.0 + * @blog http://blog.didispace.com + * + */ +@SpringBootTest +public class ApplicationTests { + + @Test + public void test1() throws Exception { + + } + +}