From 51a80b9099626cfeaccb2e4177e568daddbfa620 Mon Sep 17 00:00:00 2001 From: heqijun Date: Sat, 7 Jun 2025 19:19:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E7=AD=96=E7=95=A5=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beacon-strategy/pom.xml | 54 +++++++++++++++++++ .../mashibing/strategy/StragyApplication.java | 22 ++++++++ .../src/main/resources/bootstrap.yml | 17 ++++++ pom.xml | 1 + 4 files changed, 94 insertions(+) create mode 100644 beacon-strategy/pom.xml create mode 100644 beacon-strategy/src/main/java/com/mashibing/strategy/StragyApplication.java create mode 100644 beacon-strategy/src/main/resources/bootstrap.yml diff --git a/beacon-strategy/pom.xml b/beacon-strategy/pom.xml new file mode 100644 index 0000000..b43ff79 --- /dev/null +++ b/beacon-strategy/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + + com.mashibing + beacon-cloud + 1.0-SNAPSHOT + ../pom.xml + + + beacon-strategy + + + + + + org.springframework.boot + spring-boot-starter-web + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + org.springframework.boot + spring-boot-starter-amqp + + + + org.springframework.boot + spring-boot-starter-test + + + + org.projectlombok + lombok + + + + com.mashibing + beacon-common + 1.0-SNAPSHOT + + + \ No newline at end of file diff --git a/beacon-strategy/src/main/java/com/mashibing/strategy/StragyApplication.java b/beacon-strategy/src/main/java/com/mashibing/strategy/StragyApplication.java new file mode 100644 index 0000000..3447a3c --- /dev/null +++ b/beacon-strategy/src/main/java/com/mashibing/strategy/StragyApplication.java @@ -0,0 +1,22 @@ +package com.mashibing.strategy; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; + +/** + * @author heqijun + * @ClassName: StragyApplication + * @Description: TODO(这里用一句话描述这个类的作用) + * @date 2025/6/7 19:03 + */ + +@SpringBootApplication +@EnableFeignClients +@EnableDiscoveryClient +public class StragyApplication { + public static void main(String[] args) { + SpringApplication.run(StragyApplication.class, args); + } +} diff --git a/beacon-strategy/src/main/resources/bootstrap.yml b/beacon-strategy/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..1826b38 --- /dev/null +++ b/beacon-strategy/src/main/resources/bootstrap.yml @@ -0,0 +1,17 @@ +# 服务名称 +spring: + application: + name: beacon-strategy + # 多环境 + profiles: + active: dev + # nacos注册中心地址 + cloud: + nacos: + discovery: + server-addr: 192.168.1.13:8848 + # nacos配置中心地址: + config: + server-addr: 192.168.1.13:8848 + file-extension: yml + # beacon-strategy-dev.yml \ No newline at end of file diff --git a/pom.xml b/pom.xml index 613d7da..1e33e6b 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,7 @@ beacon-common beacon-cache beacon-test + beacon-strategy