From f0792baff497ddaf5c9d7ba8b85a7a9d377c8d71 Mon Sep 17 00:00:00 2001 From: gaoqr <13665037151@163.com> Date: Mon, 17 Jun 2024 18:47:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E8=A6=81=E5=BE=AE=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=EF=BC=88gateway=E3=80=81system=E3=80=81mgn=E3=80=81exec?= =?UTF-8?q?=EF=BC=89=E6=89=93=E5=8C=85=E6=96=B9=E5=BC=8F=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=201=E3=80=81=E6=94=AF=E6=8C=81=E6=A0=B9=E6=8D=AEprofi?= =?UTF-8?q?le=E6=89=93=E5=8C=85=E4=B8=8D=E5=90=8C=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=9C=A8jar=E5=A4=96=EF=BC=9B=202=E3=80=81=E4=BE=9D=E8=B5=96li?= =?UTF-8?q?b=E6=89=93=E5=8C=85=E5=9C=A8jar=E5=A4=96=EF=BC=9B=203=E3=80=81?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0test=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cf-gateway/pom.xml | 6 ++- cf-gateway/src/main/build/assembly.xml | 16 ++++---- .../src/main/resources/application-test.yaml | 3 ++ .../src/main/resources/bootstrap-test.yaml | 4 +- .../cf-module-prod-executor-biz/pom.xml | 40 +++++++++++++++++++ .../src/main/build/assembly.xml | 39 ++++++++++++++++++ .../src/main/resources/application-test.yaml | 4 ++ .../src/main/resources/bootstrap-test.yaml | 25 ++++++++++++ .../cf-module-prod-manage-biz/pom.xml | 40 +++++++++++++++++++ .../src/main/build/assembly.xml | 39 ++++++++++++++++++ .../src/main/resources/application-test.yaml | 4 ++ .../src/main/resources/bootstrap-test.yaml | 25 ++++++++++++ cf-module-system/cf-module-system-biz/pom.xml | 40 +++++++++++++++++++ .../src/main/build/assembly.xml | 39 ++++++++++++++++++ .../src/main/resources/application-test.yaml | 4 ++ .../src/main/resources/bootstrap-test.yaml | 25 ++++++++++++ pom.xml | 8 ++-- 17 files changed, 347 insertions(+), 14 deletions(-) create mode 100644 cf-gateway/src/main/resources/application-test.yaml create mode 100644 cf-module-prod-executor/cf-module-prod-executor-biz/src/main/build/assembly.xml create mode 100644 cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/application-test.yaml create mode 100644 cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/bootstrap-test.yaml create mode 100644 cf-module-prod-manage/cf-module-prod-manage-biz/src/main/build/assembly.xml create mode 100644 cf-module-prod-manage/cf-module-prod-manage-biz/src/main/resources/application-test.yaml create mode 100644 cf-module-prod-manage/cf-module-prod-manage-biz/src/main/resources/bootstrap-test.yaml create mode 100644 cf-module-system/cf-module-system-biz/src/main/build/assembly.xml create mode 100644 cf-module-system/cf-module-system-biz/src/main/resources/application-test.yaml create mode 100644 cf-module-system/cf-module-system-biz/src/main/resources/bootstrap-test.yaml diff --git a/cf-gateway/pom.xml b/cf-gateway/pom.xml index 57b2e9c3d..2bab1d780 100644 --- a/cf-gateway/pom.xml +++ b/cf-gateway/pom.xml @@ -121,7 +121,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.2.0 + ${maven.dependency.plugin.version} prepare-package @@ -131,6 +131,8 @@ target/lib + + com.cf.imes @@ -138,7 +140,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.3.0 + ${maven.assembly.plugin.version} false diff --git a/cf-gateway/src/main/build/assembly.xml b/cf-gateway/src/main/build/assembly.xml index 6f8d7be66..6569531ff 100644 --- a/cf-gateway/src/main/build/assembly.xml +++ b/cf-gateway/src/main/build/assembly.xml @@ -11,19 +11,21 @@ ${basedir}/src/main/resources config + application-${profileActive}.yaml bootstrap-${profileActive}.yaml bootstrap.yaml - - - - - - - + + ${basedir}/target/lib + + *.jar + + + lib + ${project.build.directory} diff --git a/cf-gateway/src/main/resources/application-test.yaml b/cf-gateway/src/main/resources/application-test.yaml new file mode 100644 index 000000000..a8f81477f --- /dev/null +++ b/cf-gateway/src/main/resources/application-test.yaml @@ -0,0 +1,3 @@ +spring: + main: + allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 \ No newline at end of file diff --git a/cf-gateway/src/main/resources/bootstrap-test.yaml b/cf-gateway/src/main/resources/bootstrap-test.yaml index 3b1ac608c..f1c6d822e 100644 --- a/cf-gateway/src/main/resources/bootstrap-test.yaml +++ b/cf-gateway/src/main/resources/bootstrap-test.yaml @@ -7,7 +7,7 @@ spring: username: nacos password: nacos discovery: - #namespace: dev # 命名空间。这里使用 dev 开发环境 + namespace: imes-test --- #################### 配置中心相关配置 #################### @@ -17,7 +17,7 @@ spring: # Nacos Config 配置项,对应 NacosConfigProperties 配置属性类 config: server-addr: 192.168.1.204:8848 # Nacos 服务器地址 - namespace: test # 命名空间。这里使用 dev 开发环境 + namespace: imes-test # 命名空间。 group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP name: # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/pom.xml b/cf-module-prod-executor/cf-module-prod-executor-biz/pom.xml index 5d482fdad..5f090cde7 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/pom.xml +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/pom.xml @@ -178,6 +178,46 @@ + + org.apache.maven.plugins + maven-dependency-plugin + ${maven.dependency.plugin.version} + + + prepare-package + + copy-dependencies + + + + target/lib + + com.cf.imes + + + + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven.assembly.plugin.version} + + false + + + src/main/build/assembly.xml + + + + + bundle + package + + single + + + + \ No newline at end of file diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/build/assembly.xml b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/build/assembly.xml new file mode 100644 index 000000000..6569531ff --- /dev/null +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/build/assembly.xml @@ -0,0 +1,39 @@ + + bundle + + tar.gz + + false + + + + + ${basedir}/src/main/resources + config + + application-${profileActive}.yaml + bootstrap-${profileActive}.yaml + bootstrap.yaml + + + + + + ${basedir}/target/lib + + *.jar + + + lib + + + + ${project.build.directory} + / + + ${project.artifactId}.jar + + + + + \ No newline at end of file diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/application-test.yaml b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/application-test.yaml new file mode 100644 index 000000000..110cf76c9 --- /dev/null +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/application-test.yaml @@ -0,0 +1,4 @@ +spring: + main: + allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 + allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 \ No newline at end of file diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/bootstrap-test.yaml b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/bootstrap-test.yaml new file mode 100644 index 000000000..7ea73df48 --- /dev/null +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/bootstrap-test.yaml @@ -0,0 +1,25 @@ +--- #################### 注册中心相关配置 #################### + +spring: + cloud: + nacos: + server-addr: 192.168.1.204:8848 + username: nacos + password: nacos + discovery: + namespace: imes-test # 命名空间。这里使用 dev 开发环境 + metadata: + version: 1.0.0 # 服务实例的版本号,可用于灰度发布 + +--- #################### 配置中心相关配置 #################### + +spring: + cloud: + nacos: + # Nacos Config 配置项,对应 NacosConfigProperties 配置属性类 + config: + server-addr: 192.168.1.204:8848 # Nacos 服务器地址 + namespace: imes-test # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境 + group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP + name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name + file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/pom.xml b/cf-module-prod-manage/cf-module-prod-manage-biz/pom.xml index ddaeabd38..edbc973de 100644 --- a/cf-module-prod-manage/cf-module-prod-manage-biz/pom.xml +++ b/cf-module-prod-manage/cf-module-prod-manage-biz/pom.xml @@ -194,6 +194,46 @@ + + org.apache.maven.plugins + maven-dependency-plugin + ${maven.dependency.plugin.version} + + + prepare-package + + copy-dependencies + + + + target/lib + + com.cf.imes + + + + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven.assembly.plugin.version} + + false + + + src/main/build/assembly.xml + + + + + bundle + package + + single + + + + diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/build/assembly.xml b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/build/assembly.xml new file mode 100644 index 000000000..6569531ff --- /dev/null +++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/build/assembly.xml @@ -0,0 +1,39 @@ + + bundle + + tar.gz + + false + + + + + ${basedir}/src/main/resources + config + + application-${profileActive}.yaml + bootstrap-${profileActive}.yaml + bootstrap.yaml + + + + + + ${basedir}/target/lib + + *.jar + + + lib + + + + ${project.build.directory} + / + + ${project.artifactId}.jar + + + + + \ No newline at end of file diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/resources/application-test.yaml b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/resources/application-test.yaml new file mode 100644 index 000000000..110cf76c9 --- /dev/null +++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/resources/application-test.yaml @@ -0,0 +1,4 @@ +spring: + main: + allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 + allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 \ No newline at end of file diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/resources/bootstrap-test.yaml b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/resources/bootstrap-test.yaml new file mode 100644 index 000000000..7ea73df48 --- /dev/null +++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/resources/bootstrap-test.yaml @@ -0,0 +1,25 @@ +--- #################### 注册中心相关配置 #################### + +spring: + cloud: + nacos: + server-addr: 192.168.1.204:8848 + username: nacos + password: nacos + discovery: + namespace: imes-test # 命名空间。这里使用 dev 开发环境 + metadata: + version: 1.0.0 # 服务实例的版本号,可用于灰度发布 + +--- #################### 配置中心相关配置 #################### + +spring: + cloud: + nacos: + # Nacos Config 配置项,对应 NacosConfigProperties 配置属性类 + config: + server-addr: 192.168.1.204:8848 # Nacos 服务器地址 + namespace: imes-test # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境 + group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP + name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name + file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties diff --git a/cf-module-system/cf-module-system-biz/pom.xml b/cf-module-system/cf-module-system-biz/pom.xml index f808a1a6b..926be9a9c 100644 --- a/cf-module-system/cf-module-system-biz/pom.xml +++ b/cf-module-system/cf-module-system-biz/pom.xml @@ -221,6 +221,46 @@ + + org.apache.maven.plugins + maven-dependency-plugin + ${maven.dependency.plugin.version} + + + prepare-package + + copy-dependencies + + + + target/lib + + com.cf.imes + + + + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven.assembly.plugin.version} + + false + + + src/main/build/assembly.xml + + + + + bundle + package + + single + + + + diff --git a/cf-module-system/cf-module-system-biz/src/main/build/assembly.xml b/cf-module-system/cf-module-system-biz/src/main/build/assembly.xml new file mode 100644 index 000000000..6569531ff --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/build/assembly.xml @@ -0,0 +1,39 @@ + + bundle + + tar.gz + + false + + + + + ${basedir}/src/main/resources + config + + application-${profileActive}.yaml + bootstrap-${profileActive}.yaml + bootstrap.yaml + + + + + + ${basedir}/target/lib + + *.jar + + + lib + + + + ${project.build.directory} + / + + ${project.artifactId}.jar + + + + + \ No newline at end of file diff --git a/cf-module-system/cf-module-system-biz/src/main/resources/application-test.yaml b/cf-module-system/cf-module-system-biz/src/main/resources/application-test.yaml new file mode 100644 index 000000000..110cf76c9 --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/resources/application-test.yaml @@ -0,0 +1,4 @@ +spring: + main: + allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 + allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 \ No newline at end of file diff --git a/cf-module-system/cf-module-system-biz/src/main/resources/bootstrap-test.yaml b/cf-module-system/cf-module-system-biz/src/main/resources/bootstrap-test.yaml new file mode 100644 index 000000000..7ea73df48 --- /dev/null +++ b/cf-module-system/cf-module-system-biz/src/main/resources/bootstrap-test.yaml @@ -0,0 +1,25 @@ +--- #################### 注册中心相关配置 #################### + +spring: + cloud: + nacos: + server-addr: 192.168.1.204:8848 + username: nacos + password: nacos + discovery: + namespace: imes-test # 命名空间。这里使用 dev 开发环境 + metadata: + version: 1.0.0 # 服务实例的版本号,可用于灰度发布 + +--- #################### 配置中心相关配置 #################### + +spring: + cloud: + nacos: + # Nacos Config 配置项,对应 NacosConfigProperties 配置属性类 + config: + server-addr: 192.168.1.204:8848 # Nacos 服务器地址 + namespace: imes-test # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境 + group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP + name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name + file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties diff --git a/pom.xml b/pom.xml index 096bed2cc..76f756d83 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,8 @@ 2.7.18 1.5.5.Final UTF-8 + 3.2.0 + 3.2.0 @@ -139,7 +141,7 @@ --> - + local @@ -147,7 +149,7 @@ local - true + false @@ -156,7 +158,7 @@ dev - false + true