From a206ef387878e6844c962c80a3e7f78f2c337d05 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 22 Mar 2023 15:58:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=9C=8D=E5=8A=A1~~=20=20?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E9=85=8D=E7=BD=AE=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 16 ++++++++-------- 02-itemstock/pom.xml | 10 ++++++++++ .../com/mashibing/ItemStockStarterApp.java | 18 ++++++++++++++++++ .../src/main/resources/application.yml | 10 ++++++++++ 4 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 02-itemstock/src/main/java/com/mashibing/ItemStockStarterApp.java create mode 100644 02-itemstock/src/main/resources/application.yml diff --git a/01-placeorder/src/main/resources/application.yml b/01-placeorder/src/main/resources/application.yml index 4b5ff9d..06a4d0d 100644 --- a/01-placeorder/src/main/resources/application.yml +++ b/01-placeorder/src/main/resources/application.yml @@ -1,10 +1,10 @@ server: - port: 80 + port: 80 -spring: - application: - name: placeorder - cloud: - nacos: - discovery: - server-addr: 114.116.226.76:8848 \ No newline at end of file + spring: + application: + name: placeorder + cloud: + nacos: + discovery: + server-addr: 114.116.226.76:8848 \ No newline at end of file diff --git a/02-itemstock/pom.xml b/02-itemstock/pom.xml index 7735daa..886f146 100644 --- a/02-itemstock/pom.xml +++ b/02-itemstock/pom.xml @@ -12,5 +12,15 @@ 02-itemstock 商品的库存服务,专门对库存做操作 + + + 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/02-itemstock/src/main/java/com/mashibing/ItemStockStarterApp.java b/02-itemstock/src/main/java/com/mashibing/ItemStockStarterApp.java new file mode 100644 index 0000000..337a0c8 --- /dev/null +++ b/02-itemstock/src/main/java/com/mashibing/ItemStockStarterApp.java @@ -0,0 +1,18 @@ +package com.mashibing; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; + +/** + * @author zjw + * @description + */ +@SpringBootApplication +@EnableDiscoveryClient +public class ItemStockStarterApp { + + public static void main(String[] args) { + SpringApplication.run(ItemStockStarterApp.class,args); + } +} diff --git a/02-itemstock/src/main/resources/application.yml b/02-itemstock/src/main/resources/application.yml new file mode 100644 index 0000000..53166ca --- /dev/null +++ b/02-itemstock/src/main/resources/application.yml @@ -0,0 +1,10 @@ +server: + port: 8080 + +spring: + application: + name: itemstock + cloud: + nacos: + discovery: + server-addr: 114.116.226.76:8848 \ No newline at end of file