From e7972b2b27584016c2fa8afac5a407ec311b7d26 Mon Sep 17 00:00:00 2001 From: zyx <438329180@qq.com> Date: Sat, 15 Oct 2022 08:02:57 +0800 Subject: [PATCH] init project --- pom.xml | 50 +++++++++++++++++++ src/main/java/com/zyx/HelloApp.java | 15 ++++++ .../com/zyx/controller/HelloController.java | 18 +++++++ src/main/resources/application.yml | 2 + 4 files changed, 85 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/com/zyx/HelloApp.java create mode 100644 src/main/java/com/zyx/controller/HelloController.java create mode 100644 src/main/resources/application.yml diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..f64ade8 --- /dev/null +++ b/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + org.example + com-zyx-mpgen + 1.0-SNAPSHOT + ${project.artifactId} + + + 8 + 8 + + + + + + + + org.springframework.boot + spring-boot-dependencies + 2.6.5 + pom + import + + + + + + + org.springframework.boot + spring-boot-starter-web + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + \ No newline at end of file diff --git a/src/main/java/com/zyx/HelloApp.java b/src/main/java/com/zyx/HelloApp.java new file mode 100644 index 0000000..7234fee --- /dev/null +++ b/src/main/java/com/zyx/HelloApp.java @@ -0,0 +1,15 @@ +package com.zyx; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * @author Yaxi.Zhang + * @since 2022/10/15 07:56 + */ +@SpringBootApplication +public class HelloApp { + public static void main(String[] args) { + SpringApplication.run(HelloApp.class, args); + } +} diff --git a/src/main/java/com/zyx/controller/HelloController.java b/src/main/java/com/zyx/controller/HelloController.java new file mode 100644 index 0000000..4ecc5df --- /dev/null +++ b/src/main/java/com/zyx/controller/HelloController.java @@ -0,0 +1,18 @@ +package com.zyx.controller; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author Yaxi.Zhang + * @since 2022/10/15 07:58 + */ +@RestController +public class HelloController { + + @GetMapping("/hello") + public String hello() { + return "Hello"; + } + +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..3621202 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,2 @@ +server: + port: 9001 \ No newline at end of file