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 { + + } + +}