commit 93c42caccb5cde2568b34866b957c744385cd1f4 Author: LQS <2506203757@qq.com> Date: Wed Jul 31 09:16:46 2024 +0800 初始化 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/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..84b9835 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..82dbec8 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b13a3eb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# 指定构建镜像的起始镜像 +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-pay"] + +#拷贝执行jar包文件COPY +COPY ./cloud-pay-server/target/cloud-pay.jar /home/app.jar + +#构建项目启动命令 +ENTRYPOINT ["java","-jar"] +CMD ["/home/app.jar"] diff --git a/cloud-pay-client/pom.xml b/cloud-pay-client/pom.xml new file mode 100644 index 0000000..8593403 --- /dev/null +++ b/cloud-pay-client/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + com.muyu + cloud-pay + 1.0.0 + + + cloud-pay-client + + + 17 + 17 + UTF-8 + + + + + diff --git a/cloud-pay-common/pom.xml b/cloud-pay-common/pom.xml new file mode 100644 index 0000000..f90c01f --- /dev/null +++ b/cloud-pay-common/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.muyu + cloud-pay + 1.0.0 + + + cloud-pay-common + + + 17 + 17 + UTF-8 + + + diff --git a/cloud-pay-remote/pom.xml b/cloud-pay-remote/pom.xml new file mode 100644 index 0000000..84d77ce --- /dev/null +++ b/cloud-pay-remote/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.muyu + cloud-pay + 1.0.0 + + + cloud-pay-remote + + + 17 + 17 + UTF-8 + + + diff --git a/cloud-pay-server/pom.xml b/cloud-pay-server/pom.xml new file mode 100644 index 0000000..77ecd16 --- /dev/null +++ b/cloud-pay-server/pom.xml @@ -0,0 +1,110 @@ + + + 4.0.0 + + com.muyu + cloud-pay + 1.0.0 + + + cloud-pay-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 + + + + + cloud-pay + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + diff --git a/cloud-pay-server/src/main/java/com/muyu/cloud/pay/MuYuPayApplication.java b/cloud-pay-server/src/main/java/com/muyu/cloud/pay/MuYuPayApplication.java new file mode 100644 index 0000000..9af2e84 --- /dev/null +++ b/cloud-pay-server/src/main/java/com/muyu/cloud/pay/MuYuPayApplication.java @@ -0,0 +1,22 @@ +package com.muyu.cloud.pay; + +import com.muyu.common.security.annotation.EnableCustomConfig; +import com.muyu.common.security.annotation.EnableMyFeignClients; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * @Author:作者姓名 + * @Package:com.muyu.cloud.pay + * @Project:cloud-pay + * @name:MuYuPayApplication + * @Date:2024/7/31 8:44 + */ +@EnableCustomConfig +@EnableMyFeignClients +@SpringBootApplication +public class MuYuPayApplication { + public static void main(String[] args) { + SpringApplication.run(MuYuPayApplication.class); + } +} diff --git a/cloud-pay-server/src/main/java/com/muyu/cloud/pay/controller/TestController.java b/cloud-pay-server/src/main/java/com/muyu/cloud/pay/controller/TestController.java new file mode 100644 index 0000000..9a1749f --- /dev/null +++ b/cloud-pay-server/src/main/java/com/muyu/cloud/pay/controller/TestController.java @@ -0,0 +1,32 @@ +package com.muyu.cloud.pay.controller; + +import com.muyu.common.core.domain.Result; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * @Author:作者姓名 + * @Package:com.muyu.cloud.pay.controller + * @Project:cloud-pay + * @name:TestController + * @Date:2024/7/31 8:48 + */ +@RequestMapping("/test") +@RestController +public class TestController { + + @PostMapping + public Result post() { + return Result.success("测试Post成功"); + } + + @GetMapping + public Result get() { + return Result.success("测试Get成功"); + } + + +} diff --git a/cloud-pay-server/src/main/resources/banner.txt b/cloud-pay-server/src/main/resources/banner.txt new file mode 100644 index 0000000..0dd5eee --- /dev/null +++ b/cloud-pay-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-pay-server/src/main/resources/bootstrap.yml b/cloud-pay-server/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..5b1f429 --- /dev/null +++ b/cloud-pay-server/src/main/resources/bootstrap.yml @@ -0,0 +1,55 @@ +# Tomcat +server: + port: 9701 + +# nacos线上地址 +nacos: + addr: 21.12.2.1:8848 + user-name: nacos + password: nacos + namespace: muyu-cloud + + +# Spring +spring: + main: + allow-bean-definition-overriding: true + application: + # 应用名称 + name: cloud-pay + 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} +#logging: +# level: +# com.muyu.system.mapper: DEBUG diff --git a/cloud-pay-server/src/main/resources/logback/dev.xml b/cloud-pay-server/src/main/resources/logback/dev.xml new file mode 100644 index 0000000..a0e16b0 --- /dev/null +++ b/cloud-pay-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-pay-server/src/main/resources/logback/prod.xml b/cloud-pay-server/src/main/resources/logback/prod.xml new file mode 100644 index 0000000..afd0098 --- /dev/null +++ b/cloud-pay-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-pay-server/src/main/resources/logback/test.xml b/cloud-pay-server/src/main/resources/logback/test.xml new file mode 100644 index 0000000..be7c5f6 --- /dev/null +++ b/cloud-pay-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..4f46106 --- /dev/null +++ b/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + + com.muyu + cloud-server-parent + 3.6.3 + + + + com.muyu + cloud-pay + 1.0.0 + pom + + + cloud-pay-server + cloud-pay-client + cloud-pay-remote + cloud-pay-common + + + + 17 + 17 + UTF-8 + + +