diff --git a/cloud-modules/cloud-modules-car/pom.xml b/cloud-modules/cloud-modules-car/pom.xml new file mode 100644 index 0000000..82c1282 --- /dev/null +++ b/cloud-modules/cloud-modules-car/pom.xml @@ -0,0 +1,112 @@ + + + 4.0.0 + + com.muyu + cloud-modules + 3.6.3 + + + cloud-modules-car + + + 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-xxl + + + + com.muyu + cloud-common-rabbit + + + + + com.muyu + cloud-common-system + + + + + com.muyu + cloud-common-api-doc + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/CarApplication.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/CarApplication.java new file mode 100644 index 0000000..75f209c --- /dev/null +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/CarApplication.java @@ -0,0 +1,18 @@ +package com.muyu.car; + +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; + +@EnableCustomConfig +@EnableMyFeignClients +@SpringBootApplication +public class CarApplication { + public static void main(String[] args){ + SpringApplication.run(CarApplication.class,args); + } + + +} diff --git a/cloud-modules/cloud-modules-car/src/main/resources/banner.txt b/cloud-modules/cloud-modules-car/src/main/resources/banner.txt new file mode 100644 index 0000000..0dd5eee --- /dev/null +++ b/cloud-modules/cloud-modules-car/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-modules/cloud-modules-car/src/main/resources/bootstrap.yml b/cloud-modules/cloud-modules-car/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..34b5d26 --- /dev/null +++ b/cloud-modules/cloud-modules-car/src/main/resources/bootstrap.yml @@ -0,0 +1,60 @@ +# Tomcat +server: + port: 9717 + +# nacos线上地址 +nacos: + addr: 47.116.173.119:8848 + user-name: nacos + password: nacos + namespace: eight +# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all +# Spring +spring: + amqp: + deserialization: + trust: + all: true + main: + allow-bean-definition-overriding: true + application: + # 应用名称 + name: cloud-car + 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} +logging: + level: + com.muyu.system.mapper: DEBUG diff --git a/cloud-modules/cloud-modules-car/src/main/resources/logback/dev.xml b/cloud-modules/cloud-modules-car/src/main/resources/logback/dev.xml new file mode 100644 index 0000000..bb11ed5 --- /dev/null +++ b/cloud-modules/cloud-modules-car/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-modules/cloud-modules-car/src/main/resources/logback/prod.xml b/cloud-modules/cloud-modules-car/src/main/resources/logback/prod.xml new file mode 100644 index 0000000..dfafbd9 --- /dev/null +++ b/cloud-modules/cloud-modules-car/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-modules/cloud-modules-car/src/main/resources/logback/test.xml b/cloud-modules/cloud-modules-car/src/main/resources/logback/test.xml new file mode 100644 index 0000000..dfafbd9 --- /dev/null +++ b/cloud-modules/cloud-modules-car/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/cloud-modules/pom.xml b/cloud-modules/pom.xml index ba0d555..516b222 100644 --- a/cloud-modules/pom.xml +++ b/cloud-modules/pom.xml @@ -12,6 +12,7 @@ cloud-modules-system cloud-modules-gen cloud-modules-file + cloud-modules-car cloud-modules