From 4e3e69161aeb41bc426248daf97a5604ceca5c89 Mon Sep 17 00:00:00 2001 From: yh <1844516659@qq.com> Date: Thu, 14 Jul 2022 11:00:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=9E=E6=BB=B4=E5=87=BA=E8=A1=8C=E7=BD=91?= =?UTF-8?q?=E7=BA=A6=E8=BD=A62022-passenger=E9=A1=B9=E7=9B=AE=E9=AA=A8?= =?UTF-8?q?=E6=9E=B6=E6=90=AD=E5=BB=BA=E5=92=8C=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-passenger/pom.xml | 7 +++++++ .../apipassenger/ApiPassengerApplication.java | 13 +++++++++++++ .../controller/TestController.java | 19 +++++++++++++++++++ .../src/main/resources/application.yml | 2 ++ pom.xml | 11 +++++++++++ 5 files changed, 52 insertions(+) create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/ApiPassengerApplication.java create mode 100644 api-passenger/src/main/java/com/mashibing/apipassenger/controller/TestController.java create mode 100644 api-passenger/src/main/resources/application.yml diff --git a/api-passenger/pom.xml b/api-passenger/pom.xml index 9041a90..1fa622f 100644 --- a/api-passenger/pom.xml +++ b/api-passenger/pom.xml @@ -12,4 +12,11 @@ api-passenger + + + org.springframework.boot + spring-boot-starter-web + + + \ No newline at end of file diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/ApiPassengerApplication.java b/api-passenger/src/main/java/com/mashibing/apipassenger/ApiPassengerApplication.java new file mode 100644 index 0000000..382d7b5 --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/ApiPassengerApplication.java @@ -0,0 +1,13 @@ +package com.mashibing.apipassenger; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class ApiPassengerApplication { + + public static void main(String[] args) { + SpringApplication.run(ApiPassengerApplication.class); + } + +} diff --git a/api-passenger/src/main/java/com/mashibing/apipassenger/controller/TestController.java b/api-passenger/src/main/java/com/mashibing/apipassenger/controller/TestController.java new file mode 100644 index 0000000..7c50fc0 --- /dev/null +++ b/api-passenger/src/main/java/com/mashibing/apipassenger/controller/TestController.java @@ -0,0 +1,19 @@ +package com.mashibing.apipassenger.controller; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class TestController { + + @GetMapping("/") + public String index(){ + return "this is api passenger"; + } + + @GetMapping("/test") + public String test(){ + return "test api passenger"; + } + +} diff --git a/api-passenger/src/main/resources/application.yml b/api-passenger/src/main/resources/application.yml new file mode 100644 index 0000000..54b155f --- /dev/null +++ b/api-passenger/src/main/resources/application.yml @@ -0,0 +1,2 @@ +server: + port: 8081 \ No newline at end of file diff --git a/pom.xml b/pom.xml index ce6c81b..000e7d6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,17 +4,28 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.4.13 + + com.mashibing online-taxi-public 1.0-SNAPSHOT + api-passenger + pom 8 8 + + + \ No newline at end of file