commit 44d0387265d8b15be464611ea753736767eb5d8f Author: WeiRan <2392355487@qq.com> Date: Mon Aug 19 19:15:59 2024 +0800 模版创建 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.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 \ No newline at end of file diff --git a/cloud-market-common/.gitignore b/cloud-market-common/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/cloud-market-common/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.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 \ No newline at end of file diff --git a/cloud-market-common/pom.xml b/cloud-market-common/pom.xml new file mode 100644 index 0000000..1c8da44 --- /dev/null +++ b/cloud-market-common/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + com.muyu + cloud-market + 1.0.0 + + + cloud-market-common + 1.0.0 + + + 17 + 17 + UTF-8 + + + + + com.muyu + cloud-common-core + + + + diff --git a/cloud-market-remote/.gitignore b/cloud-market-remote/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/cloud-market-remote/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.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 \ No newline at end of file diff --git a/cloud-market-remote/pom.xml b/cloud-market-remote/pom.xml new file mode 100644 index 0000000..783f0d7 --- /dev/null +++ b/cloud-market-remote/pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + + com.muyu + cloud-market + 1.0.0 + + + cloud-market-remote + 1.0.0 + + + 17 + 17 + UTF-8 + + + + + + com.muyu + cloud-market-common + 1.0.0 + + + + diff --git a/cloud-market-remote/src/main/java/com/muyu/Main.java b/cloud-market-remote/src/main/java/com/muyu/Main.java new file mode 100644 index 0000000..8bad065 --- /dev/null +++ b/cloud-market-remote/src/main/java/com/muyu/Main.java @@ -0,0 +1,14 @@ +package com.muyu; + +/** + * @Author:weiran + * @Package:com.muyu + * @Project:Default (Template) Project + * @name:${NAME} + * @Date:2024/8/19 15:13 + */ +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} diff --git a/cloud-market-server/.gitignore b/cloud-market-server/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/cloud-market-server/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.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 \ No newline at end of file diff --git a/cloud-market-server/pom.xml b/cloud-market-server/pom.xml new file mode 100644 index 0000000..9d2e86b --- /dev/null +++ b/cloud-market-server/pom.xml @@ -0,0 +1,128 @@ + + + 4.0.0 + + com.muyu + cloud-market + 1.0.0 + + + cloud-market-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 + + + + + + + cloud-market + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.1 + + true + + + + + + diff --git a/cloud-market-server/src/main/java/com/muyu/cloud/market/MuYuMarketApplication.java b/cloud-market-server/src/main/java/com/muyu/cloud/market/MuYuMarketApplication.java new file mode 100644 index 0000000..0bc240b --- /dev/null +++ b/cloud-market-server/src/main/java/com/muyu/cloud/market/MuYuMarketApplication.java @@ -0,0 +1,27 @@ +package com.muyu.cloud.market; + +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; +import org.springframework.context.ConfigurableApplicationContext; + +/** + * @Author:weiran + * @Package:com.muyu.cloud.pay + * @Project:cloud-pay + * @name:MuYuPayApplication + * @Date:2024/7/31 19:28 + */ +@Log4j2 +@EnableCustomConfig +@EnableMyFeignClients +@SpringBootApplication +public class MuYuMarketApplication { + + public static void main (String[] args) { + + ConfigurableApplicationContext applicationContext = SpringApplication.run(MuYuMarketApplication.class, args); + } +} diff --git a/cloud-market-server/src/main/resources/banner.txt b/cloud-market-server/src/main/resources/banner.txt new file mode 100644 index 0000000..0dd5eee --- /dev/null +++ b/cloud-market-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-market-server/src/main/resources/bootstrap.yml b/cloud-market-server/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..2ad4b44 --- /dev/null +++ b/cloud-market-server/src/main/resources/bootstrap.yml @@ -0,0 +1,53 @@ +# Tomcat +server: + port: 9701 + +# nacos线上地址 +nacos: + addr: 21.12.0.8:8848 + user-name: nacos + password: nacos + +# Spring +spring: + main: + allow-bean-definition-overriding: true + application: + # 应用名称 + name: cloud-market + 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} + # rabbit 配置文件 + - application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + diff --git a/cloud-market-server/src/main/resources/logback/dev.xml b/cloud-market-server/src/main/resources/logback/dev.xml new file mode 100644 index 0000000..bb11ed5 --- /dev/null +++ b/cloud-market-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-market-server/src/main/resources/logback/prod.xml b/cloud-market-server/src/main/resources/logback/prod.xml new file mode 100644 index 0000000..dfafbd9 --- /dev/null +++ b/cloud-market-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-market-server/src/main/resources/logback/test.xml b/cloud-market-server/src/main/resources/logback/test.xml new file mode 100644 index 0000000..dfafbd9 --- /dev/null +++ b/cloud-market-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..0040501 --- /dev/null +++ b/pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + + + + com.muyu + cloud-server-parent + 3.6.4 + + + + cloud-market + 1.0.0 + pom + + cloud-market-common + cloud-market-remote + cloud-market-server + + + + 17 + 17 + UTF-8 + + +