From 53b069d0d95034e6e400d9ca94975d9912bae67d Mon Sep 17 00:00:00 2001
From: yh <1844516659@qq.com>
Date: Tue, 19 Jul 2022 17:58:06 +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-api-boss=E9=A1=B9=E7=9B=AE=E5=88=9B?=
=?UTF-8?q?=E5=BB=BA=E4=BB=A5=E5=8F=8A=E6=9C=8D=E5=8A=A1=E6=B3=A8=E5=86=8C?=
=?UTF-8?q?=E5=88=B0Nacos?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api-boss/.gitignore | 48 +++++++++++++++++++
api-boss/pom.xml | 25 ++++++++++
.../mashibing/apiboss/ApiBossApplication.java | 11 +++++
.../apiboss/controller/TestControler.java | 18 +++++++
api-boss/src/main/resources/application.yml | 9 ++++
pom.xml | 1 +
项目端口预设.md | 3 +-
7 files changed, 114 insertions(+), 1 deletion(-)
create mode 100644 api-boss/.gitignore
create mode 100644 api-boss/pom.xml
create mode 100644 api-boss/src/main/java/com/mashibing/apiboss/ApiBossApplication.java
create mode 100644 api-boss/src/main/java/com/mashibing/apiboss/controller/TestControler.java
create mode 100644 api-boss/src/main/resources/application.yml
diff --git a/api-boss/.gitignore b/api-boss/.gitignore
new file mode 100644
index 0000000..bdd28b0
--- /dev/null
+++ b/api-boss/.gitignore
@@ -0,0 +1,48 @@
+# .gitignore
+
+### IntelliJ IDEA Project ###
+.idea
+*.iws
+*.iml
+*.ipr
+/.idea
+target
+src/test/
+!**/src/test/**/target/
+#!**/src/main/**/target/
+
+### Maven template
+HELP.md
+README.md
+.mvn
+mvnw
+mvnw.cmd
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+dependency-reduced-pom.xml
+buildNumber.properties
+timing.properties
+#.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+
+### VS Code ###
+.vscode/
diff --git a/api-boss/pom.xml b/api-boss/pom.xml
new file mode 100644
index 0000000..f755ff5
--- /dev/null
+++ b/api-boss/pom.xml
@@ -0,0 +1,25 @@
+
+
+
+ online-taxi-public
+ com.mashibing
+ 1.0-SNAPSHOT
+
+ 4.0.0
+
+ api-boss
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
\ No newline at end of file
diff --git a/api-boss/src/main/java/com/mashibing/apiboss/ApiBossApplication.java b/api-boss/src/main/java/com/mashibing/apiboss/ApiBossApplication.java
new file mode 100644
index 0000000..0615eb5
--- /dev/null
+++ b/api-boss/src/main/java/com/mashibing/apiboss/ApiBossApplication.java
@@ -0,0 +1,11 @@
+package com.mashibing.apiboss;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ApiBossApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(ApiBossApplication.class);
+ }
+}
diff --git a/api-boss/src/main/java/com/mashibing/apiboss/controller/TestControler.java b/api-boss/src/main/java/com/mashibing/apiboss/controller/TestControler.java
new file mode 100644
index 0000000..cf6bdd2
--- /dev/null
+++ b/api-boss/src/main/java/com/mashibing/apiboss/controller/TestControler.java
@@ -0,0 +1,18 @@
+package com.mashibing.apiboss.controller;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class TestControler {
+
+ @Value("${spring.application.name}")
+ private String serviceName;
+
+ @GetMapping("/")
+ public String test() {
+ return serviceName;
+ }
+
+}
diff --git a/api-boss/src/main/resources/application.yml b/api-boss/src/main/resources/application.yml
new file mode 100644
index 0000000..da4bd16
--- /dev/null
+++ b/api-boss/src/main/resources/application.yml
@@ -0,0 +1,9 @@
+server:
+ port: 8087
+spring:
+ application:
+ name: api-boss
+ cloud:
+ nacos:
+ discovery:
+ server-addr: localhost:8848
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index dc0cf8d..ce21e29 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,6 +30,7 @@
service-price
service-map
service-driver-user
+ api-boss
diff --git a/项目端口预设.md b/项目端口预设.md
index 953a854..6ef4b72 100644
--- a/项目端口预设.md
+++ b/项目端口预设.md
@@ -5,4 +5,5 @@
| service-passenger-user|8083|
| service-price|8084|
|service-map|8085|
-|service-driver-user|8086|
\ No newline at end of file
+|service-driver-user|8086|
+|api-boss|8087|
\ No newline at end of file