From 943a7caa70942101c5b117a04aee791f467dbe15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=9B=A8=E6=9C=A8c?= <857448963@qq.com>
Date: Mon, 30 Oct 2023 16:45:56 +0800
Subject: [PATCH] =?UTF-8?q?=E7=81=BF=E8=83=BD=E4=BA=91=E6=A8=A1=E5=9D=97?=
=?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app-cloud/.gitignore | 33 ++++
app-cloud/app-cloud-api/.gitignore | 33 ++++
app-cloud/app-cloud-api/pom.xml | 41 +++++
.../src/main/resources/application.properties | 1 +
.../njcn/main/MainApiApplicationTests.java | 13 ++
app-cloud/app-cloud-boot/.gitignore | 33 ++++
app-cloud/app-cloud-boot/pom.xml | 150 ++++++++++++++++++
.../com/njcn/main/MainBootApplication.java | 20 +++
.../src/main/resources/bootstrap.yml | 48 ++++++
.../njcn/main/MainBootApplicationTests.java | 13 ++
app-cloud/pom.xml | 26 +++
pom.xml | 1 +
12 files changed, 412 insertions(+)
create mode 100644 app-cloud/.gitignore
create mode 100644 app-cloud/app-cloud-api/.gitignore
create mode 100644 app-cloud/app-cloud-api/pom.xml
create mode 100644 app-cloud/app-cloud-api/src/main/resources/application.properties
create mode 100644 app-cloud/app-cloud-api/src/test/java/com/njcn/main/MainApiApplicationTests.java
create mode 100644 app-cloud/app-cloud-boot/.gitignore
create mode 100644 app-cloud/app-cloud-boot/pom.xml
create mode 100644 app-cloud/app-cloud-boot/src/main/java/com/njcn/main/MainBootApplication.java
create mode 100644 app-cloud/app-cloud-boot/src/main/resources/bootstrap.yml
create mode 100644 app-cloud/app-cloud-boot/src/test/java/com/njcn/main/MainBootApplicationTests.java
create mode 100644 app-cloud/pom.xml
diff --git a/app-cloud/.gitignore b/app-cloud/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/app-cloud/.gitignore
@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
diff --git a/app-cloud/app-cloud-api/.gitignore b/app-cloud/app-cloud-api/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/app-cloud/app-cloud-api/.gitignore
@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
diff --git a/app-cloud/app-cloud-api/pom.xml b/app-cloud/app-cloud-api/pom.xml
new file mode 100644
index 0000000..50a0793
--- /dev/null
+++ b/app-cloud/app-cloud-api/pom.xml
@@ -0,0 +1,41 @@
+
+
+
+ app-cloud
+ com.njcn
+ 1.0.0
+
+
+ 4.0.0
+ app-cloud-api
+ app-cloud-api
+
+
+
+ com.njcn
+ common-core
+ ${project.version}
+
+
+ com.njcn
+ common-db
+ ${project.version}
+
+
+ org.projectlombok
+ lombok
+
+
+ com.njcn
+ common-microservice
+ ${project.version}
+
+
+
+
+ UTF-8
+ 8
+ 8
+
+
diff --git a/app-cloud/app-cloud-api/src/main/resources/application.properties b/app-cloud/app-cloud-api/src/main/resources/application.properties
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/app-cloud/app-cloud-api/src/main/resources/application.properties
@@ -0,0 +1 @@
+
diff --git a/app-cloud/app-cloud-api/src/test/java/com/njcn/main/MainApiApplicationTests.java b/app-cloud/app-cloud-api/src/test/java/com/njcn/main/MainApiApplicationTests.java
new file mode 100644
index 0000000..c657c6d
--- /dev/null
+++ b/app-cloud/app-cloud-api/src/test/java/com/njcn/main/MainApiApplicationTests.java
@@ -0,0 +1,13 @@
+package com.njcn.main;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class MainApiApplicationTests {
+
+ @Test
+ void contextLoads() {
+ }
+
+}
diff --git a/app-cloud/app-cloud-boot/.gitignore b/app-cloud/app-cloud-boot/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/app-cloud/app-cloud-boot/.gitignore
@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
diff --git a/app-cloud/app-cloud-boot/pom.xml b/app-cloud/app-cloud-boot/pom.xml
new file mode 100644
index 0000000..d12f517
--- /dev/null
+++ b/app-cloud/app-cloud-boot/pom.xml
@@ -0,0 +1,150 @@
+
+
+
+ app-cloud
+ com.njcn
+ 1.0.0
+
+ 4.0.0
+ app-cloud-boot
+ app-cloud-boot
+
+ UTF-8
+ 8
+ 8
+
+
+
+ com.njcn
+ common-web
+ ${project.version}
+
+
+ com.njcn
+ common-swagger
+ ${project.version}
+
+
+ org.mybatis
+ mybatis-spring
+ 2.0.5
+
+
+ com.njcn
+ common-db
+ ${project.version}
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ 4.9.0
+
+
+ com.squareup.okhttp3
+ logging-interceptor
+ 4.9.0
+
+
+ com.njcn
+ app-cloud-api
+ 1.0.0
+
+
+
+ com.njcn
+ common-oss
+ 1.0.0
+ compile
+
+
+ com.njcn
+ common-event
+ 1.0.0
+ compile
+
+
+ com.njcn
+ common-oss
+ 1.0.0
+ compile
+
+
+ com.njcn
+ user-api
+ 1.0.0
+ compile
+
+
+ com.njcn
+ system-api
+ 1.0.0
+ compile
+
+
+
+
+ appMainBoot
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.0
+
+ -Xlint:unchecked
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ package
+
+ repackage
+
+
+
+
+
+ com.spotify
+ docker-maven-plugin
+ 1.2.2
+
+
+
+ build-image
+ ${docker.operate}
+
+ build
+
+
+
+
+
+ http://${docker.repostory}
+
+ ${docker.repostory}/${docker.registry.name}/${project.artifactId}
+
+
+ latest
+
+
+ ${docker.url}
+ ${basedir}/
+
+
+
+ /ROOT
+
+ ${project.build.directory}
+
+ ${project.build.finalName}.jar
+
+
+
+
+
+
+
diff --git a/app-cloud/app-cloud-boot/src/main/java/com/njcn/main/MainBootApplication.java b/app-cloud/app-cloud-boot/src/main/java/com/njcn/main/MainBootApplication.java
new file mode 100644
index 0000000..0daa1aa
--- /dev/null
+++ b/app-cloud/app-cloud-boot/src/main/java/com/njcn/main/MainBootApplication.java
@@ -0,0 +1,20 @@
+package com.njcn.main;
+
+import lombok.extern.slf4j.Slf4j;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+
+@Slf4j
+@MapperScan("com.njcn.**.mapper")
+@EnableFeignClients(basePackages = "com.njcn")
+@SpringBootApplication(scanBasePackages = "com.njcn")
+public class MainBootApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(MainBootApplication.class, args);
+ }
+
+}
diff --git a/app-cloud/app-cloud-boot/src/main/resources/bootstrap.yml b/app-cloud/app-cloud-boot/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..4a3c04c
--- /dev/null
+++ b/app-cloud/app-cloud-boot/src/main/resources/bootstrap.yml
@@ -0,0 +1,48 @@
+#?????????
+microservice:
+ ename: @artifactId@
+ name: '@name@'
+ version: @version@
+ sentinel:
+ url: @sentinel.url@
+ gateway:
+ url: @gateway.url@
+server:
+ port: 10225
+ max-http-header-size: 1048576
+#feign????????????
+feign:
+ sentinel:
+ enabled: true
+spring:
+ application:
+ name: @artifactId@
+ #nacos?????????????
+ cloud:
+ nacos:
+ discovery:
+ ip: @service.server.url@
+ server-addr: @nacos.url@
+ namespace: @nacos.namespace@
+ config:
+ server-addr: @nacos.url@
+ namespace: @nacos.namespace@
+ file-extension: yaml
+ shared-configs:
+ - data-id: share-config.yaml
+ refresh: true
+ - data-Id: share-config-datasource-db.yaml
+ refresh: true
+ main:
+ allow-bean-definition-overriding: true
+#???????
+logging:
+ config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
+ level:
+ root: info
+#mybatis????
+mybatis-plus:
+ type-aliases-package: com.njcn.main.pojo
+mqtt:
+ client-id: @artifactId@${random.value}
+
diff --git a/app-cloud/app-cloud-boot/src/test/java/com/njcn/main/MainBootApplicationTests.java b/app-cloud/app-cloud-boot/src/test/java/com/njcn/main/MainBootApplicationTests.java
new file mode 100644
index 0000000..9653d8f
--- /dev/null
+++ b/app-cloud/app-cloud-boot/src/test/java/com/njcn/main/MainBootApplicationTests.java
@@ -0,0 +1,13 @@
+package com.njcn.main;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class MainBootApplicationTests {
+
+ @Test
+ void contextLoads() {
+ }
+
+}
diff --git a/app-cloud/pom.xml b/app-cloud/pom.xml
new file mode 100644
index 0000000..2998778
--- /dev/null
+++ b/app-cloud/pom.xml
@@ -0,0 +1,26 @@
+
+
+
+ govern
+ com.njcn
+ 1.0.0
+
+
+ 4.0.0
+ app-cloud
+ pom
+ app-cloud
+ 灿能云app
+
+
+ app-cloud-api
+ app-cloud-boot
+
+
+
+ UTF-8
+ 8
+ 8
+
+
diff --git a/pom.xml b/pom.xml
index 167d5ef..7b01bdd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,6 +12,7 @@
cs-harmonic
cs-report
cs-system
+ app-cloud
govern