commit f0b8a1d94b4b238a03c50d34d4dcb369ec12e29c
Author: chentaisen <14615430+chentaisen@user.noreply.gitee.com>
Date: Sat Aug 10 20:05:10 2024 +0800
11
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3e403e3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,35 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..2b3abf1
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,20 @@
+# |——home
+# |——app.jar - 启动jar包
+# |—— logs - 日志文件
+
+# 指定构建镜像的起始对象
+FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/dragonwell:17.0.4.0.4.8-standard-ga-8.6
+
+#定义时区参数
+ENV TZ=Asia/Shanghai
+#设置时区
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
+# 挂载工作目录
+VOLUME ["/home/logs/cloud-resource"]
+
+#拷贝 执行 jar 包文件
+COPY ./cloud-resource-server/target/cloud-resource.jar /home/app.jar
+
+#构建启动命令
+ENTRYPOINT ["java","-Dfile.encoding=utf-8","-jar"]
+CMD ["/home/app.jar"]
diff --git a/cloud-resource-client/pom.xml b/cloud-resource-client/pom.xml
new file mode 100644
index 0000000..a0ddeaf
--- /dev/null
+++ b/cloud-resource-client/pom.xml
@@ -0,0 +1,27 @@
+
+
+ 4.0.0
+
+ com.muyu
+ cloud-resource
+ 1.0.0
+
+
+ cloud-resource-client
+ 1.0.0
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+ com.muyu
+ cloud-resource-common
+
+
+
diff --git a/cloud-resource-client/src/main/java/com/muyu/Main.java b/cloud-resource-client/src/main/java/com/muyu/Main.java
new file mode 100644
index 0000000..95690d4
--- /dev/null
+++ b/cloud-resource-client/src/main/java/com/muyu/Main.java
@@ -0,0 +1,7 @@
+package com.muyu;
+
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file
diff --git a/cloud-resource-common/pom.xml b/cloud-resource-common/pom.xml
new file mode 100644
index 0000000..7b40953
--- /dev/null
+++ b/cloud-resource-common/pom.xml
@@ -0,0 +1,26 @@
+
+
+ 4.0.0
+
+ com.muyu
+ cloud-resource
+ 1.0.0
+
+
+ cloud-resource-common
+ 1.0.0
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+ com.muyu
+ cloud-common-core
+
+
+
diff --git a/cloud-resource-common/src/main/java/com/muyu/Main.java b/cloud-resource-common/src/main/java/com/muyu/Main.java
new file mode 100644
index 0000000..95690d4
--- /dev/null
+++ b/cloud-resource-common/src/main/java/com/muyu/Main.java
@@ -0,0 +1,7 @@
+package com.muyu;
+
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file
diff --git a/cloud-resource-remote/pom.xml b/cloud-resource-remote/pom.xml
new file mode 100644
index 0000000..f7c6a5b
--- /dev/null
+++ b/cloud-resource-remote/pom.xml
@@ -0,0 +1,27 @@
+
+
+ 4.0.0
+
+ com.muyu
+ cloud-resource
+ 1.0.0
+
+
+ cloud-resource-remote
+ 1.0.0
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+ com.muyu
+ cloud-resource-common
+
+
+
diff --git a/cloud-resource-remote/src/main/java/com/muyu/Main.java b/cloud-resource-remote/src/main/java/com/muyu/Main.java
new file mode 100644
index 0000000..95690d4
--- /dev/null
+++ b/cloud-resource-remote/src/main/java/com/muyu/Main.java
@@ -0,0 +1,7 @@
+package com.muyu;
+
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file
diff --git a/cloud-resource-server/pom.xml b/cloud-resource-server/pom.xml
new file mode 100644
index 0000000..a5ccea6
--- /dev/null
+++ b/cloud-resource-server/pom.xml
@@ -0,0 +1,126 @@
+
+
+ 4.0.0
+
+ com.muyu
+ cloud-resource
+ 1.0.0
+
+
+ cloud-resource-server
+ 1.0.0
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ com.mysql
+ mysql-connector-j
+
+
+
+
+ com.muyu
+ cloud-common-datasource
+
+
+
+
+ com.muyu
+ cloud-common-datascope
+
+
+
+
+ com.muyu
+ cloud-common-log
+
+
+
+
+ com.muyu
+ cloud-common-api-doc
+
+
+
+
+
+ com.muyu
+ cloud-common-xxl
+
+
+
+ com.muyu
+ cloud-common-rabbit
+
+
+
+ com.muyu
+ cloud-pay-common
+
+
+
+ com.muyu
+ cloud-common-nacos-remote
+ 1.0.0
+
+
+
+
+ cloud-resource
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
diff --git a/cloud-resource-server/src/main/java/com/muyu/MuYuResourceApplication.java b/cloud-resource-server/src/main/java/com/muyu/MuYuResourceApplication.java
new file mode 100644
index 0000000..468e54c
--- /dev/null
+++ b/cloud-resource-server/src/main/java/com/muyu/MuYuResourceApplication.java
@@ -0,0 +1,18 @@
+package com.muyu;
+
+import com.muyu.common.security.annotation.EnableCustomConfig;
+import com.muyu.common.security.annotation.EnableMyFeignClients;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@Log4j2
+@EnableCustomConfig
+@EnableMyFeignClients
+@SpringBootApplication
+public class MuYuResourceApplication {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ SpringApplication.run(MuYuResourceApplication.class);
+ }
+}
diff --git a/cloud-resource-server/src/main/java/com/muyu/cloud/resource/controller/ResourceController.java b/cloud-resource-server/src/main/java/com/muyu/cloud/resource/controller/ResourceController.java
new file mode 100644
index 0000000..be84b1a
--- /dev/null
+++ b/cloud-resource-server/src/main/java/com/muyu/cloud/resource/controller/ResourceController.java
@@ -0,0 +1,11 @@
+package com.muyu.cloud.resource.controller;
+
+/**
+ * @ClassName ResourceController
+ * @Description 描述
+ * @Author Chen
+ * @Date 2024/8/10 19:34
+ */
+
+public class ResourceController {
+}
diff --git a/cloud-resource-server/src/main/resources/banner.txt b/cloud-resource-server/src/main/resources/banner.txt
new file mode 100644
index 0000000..0dd5eee
--- /dev/null
+++ b/cloud-resource-server/src/main/resources/banner.txt
@@ -0,0 +1,2 @@
+Spring Boot Version: ${spring-boot.version}
+Spring Application Name: ${spring.application.name}
diff --git a/cloud-resource-server/src/main/resources/bootstrap.yml b/cloud-resource-server/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..2b02b7d
--- /dev/null
+++ b/cloud-resource-server/src/main/resources/bootstrap.yml
@@ -0,0 +1,51 @@
+# Tomcat
+server:
+ port: 9701
+
+# nacos线上地址
+nacos:
+ addr: 21.12.2.1:8848
+ user-name: nacos
+ password: nacos
+ namespace: cloud-2112
+
+# Spring
+spring:
+ main:
+ allow-bean-definition-overriding: true
+ application:
+ # 应用名称
+ name: cloud-resource
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ discovery:
+ # 服务注册地址
+ server-addr: ${nacos.addr}
+ # nacos用户名
+ username: ${nacos.user-name}
+ # nacos密码
+ password: ${nacos.password}
+ # 命名空间
+ namespace: ${nacos.namespace}
+ config:
+ # 服务注册地址
+ server-addr: ${nacos.addr}
+ # nacos用户名
+ username: ${nacos.user-name}
+ # nacos密码
+ password: ${nacos.password}
+ # 命名空间
+ namespace: ${nacos.namespace}
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ # 系统共享配置
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+ # 系统环境Config共享配置
+ - application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+ # xxl-job 配置文件
+ - application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
diff --git a/cloud-resource-server/src/main/resources/logback/dev.xml b/cloud-resource-server/src/main/resources/logback/dev.xml
new file mode 100644
index 0000000..13a1ff3
--- /dev/null
+++ b/cloud-resource-server/src/main/resources/logback/dev.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+ ${log.pattern}
+
+
+
+
+
+ ${log.path}/info.log
+
+
+
+ ${log.path}/info.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+ ${log.pattern}
+
+
+
+ INFO
+
+ ACCEPT
+
+ DENY
+
+
+
+
+ ${log.path}/error.log
+
+
+
+ ${log.path}/error.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+ ${log.pattern}
+
+
+
+ ERROR
+
+ ACCEPT
+
+ DENY
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cloud-resource-server/src/main/resources/logback/prod.xml b/cloud-resource-server/src/main/resources/logback/prod.xml
new file mode 100644
index 0000000..3d34aca
--- /dev/null
+++ b/cloud-resource-server/src/main/resources/logback/prod.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+ ${log.sky.pattern}
+
+
+
+
+
+ ${log.path}/info.log
+
+
+
+ ${log.path}/info.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+
+
+ INFO
+
+ ACCEPT
+
+ DENY
+
+
+
+
+ ${log.path}/error.log
+
+
+
+ ${log.path}/error.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+
+
+ ERROR
+
+ ACCEPT
+
+ DENY
+
+
+
+
+
+
+
+ ${log.sky.pattern}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cloud-resource-server/src/main/resources/logback/test.xml b/cloud-resource-server/src/main/resources/logback/test.xml
new file mode 100644
index 0000000..3d34aca
--- /dev/null
+++ b/cloud-resource-server/src/main/resources/logback/test.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+ ${log.sky.pattern}
+
+
+
+
+
+ ${log.path}/info.log
+
+
+
+ ${log.path}/info.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+
+
+ INFO
+
+ ACCEPT
+
+ DENY
+
+
+
+
+ ${log.path}/error.log
+
+
+
+ ${log.path}/error.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+
+
+ ERROR
+
+ ACCEPT
+
+ DENY
+
+
+
+
+
+
+
+ ${log.sky.pattern}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..38ae5be
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,29 @@
+
+
+ 4.0.0
+
+
+ com.muyu
+ cloud-server-parent
+ 3.6.4
+
+
+ cloud-resource
+ 1.0.0
+ pom
+
+ cloud-resource-client
+ cloud-resource-common
+ cloud-resource-remote
+ cloud-resource-server
+
+
+
+ 17
+ 17
+ UTF-8
+
+
+
diff --git a/src/main/java/com/muyu/Main.java b/src/main/java/com/muyu/Main.java
new file mode 100644
index 0000000..95690d4
--- /dev/null
+++ b/src/main/java/com/muyu/Main.java
@@ -0,0 +1,7 @@
+package com.muyu;
+
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file