commit 11daaf0e48c1d441bf19246dce42e61e39c96852 Author: fst1996 <2411194573@qq.com> Date: Sun Nov 19 14:57:18 2023 +0800 车联网数据解析层初始化 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..09bdfea --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ +###################################################################### +# Build Tools + +.gradle +/build/ +!gradle/wrapper/gradle-wrapper.jar + +target/ +!.mvn/wrapper/maven-wrapper.jar + +###################################################################### +# IDE + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### JRebel ### +rebel.xml +### NetBeans ### +nbproject/private/ +build/* +nbbuild/ +dist/ +nbdist/ +.nb-gradle/ + +###################################################################### +# Others +*.log +*.xml.versionsBackup +*.swp + +!*/build/*.java +!*/build/*.html +!*/build/*.xml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bc645d9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# 基础镜像 +FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6 + +#暴露端口位置 +EXPOSE 9801 + +# 挂载目录 +VOLUME /home/logs/god-data-server + +# 复制jar文件到docker内部 +COPY /car-data-server/target/car-data-server.jar /home/app.jar + +#工作目录 exec -it 进来默认就是这个目 +WORKDIR /home + +# 启动java程序 +ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-jar","/home/app.jar"] diff --git a/car-data-common/pom.xml b/car-data-common/pom.xml new file mode 100644 index 0000000..f30404f --- /dev/null +++ b/car-data-common/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + com.god + god-car-data + 3.6.3 + + + car-data-common + + + 17 + 17 + UTF-8 + + + + + + + + com.god + god-common-datasource + + + + + com.god + god-common-datascope + + + + + com.god + god-common-log + + + + + com.god + god-common-swagger + + + + + \ No newline at end of file diff --git a/car-data-remote/pom.xml b/car-data-remote/pom.xml new file mode 100644 index 0000000..0482aec --- /dev/null +++ b/car-data-remote/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + com.god + god-car-data + 3.6.3 + + + car-data-remote + + + 17 + 17 + UTF-8 + + + + + com.god + car-data-common + 3.6.3 + + + + \ No newline at end of file diff --git a/car-data-server/pom.xml b/car-data-server/pom.xml new file mode 100644 index 0000000..92030fb --- /dev/null +++ b/car-data-server/pom.xml @@ -0,0 +1,90 @@ + + + 4.0.0 + + com.god + god-car-data + 3.6.3 + + + car-data-server + + + 17 + 17 + UTF-8 + + + + + com.god + car-data-common + 3.6.3 + + + + 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 + + + + + io.springfox + springfox-swagger-ui + ${swagger.fox.version} + + + + + com.mysql + mysql-connector-j + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + \ No newline at end of file diff --git a/car-data-server/src/main/java/com/god/data/server/GodCarDataApplication.java b/car-data-server/src/main/java/com/god/data/server/GodCarDataApplication.java new file mode 100644 index 0000000..3cec855 --- /dev/null +++ b/car-data-server/src/main/java/com/god/data/server/GodCarDataApplication.java @@ -0,0 +1,22 @@ +package com.god.data.server; + +import com.god.common.security.annotation.EnableCustomConfig; +import com.god.common.security.annotation.EnableMyFeignClients; +import com.god.common.swagger.annotation.EnableCustomSwagger2; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 系统模块 + * + * @author god + */ +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableMyFeignClients +@SpringBootApplication +public class GodCarDataApplication { + public static void main (String[] args) { + SpringApplication.run(com.god.data.server.GodCarDataApplication.class, args); + } +} diff --git a/car-data-server/src/main/resources/banner.txt b/car-data-server/src/main/resources/banner.txt new file mode 100644 index 0000000..0dd5eee --- /dev/null +++ b/car-data-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/car-data-server/src/main/resources/bootstrap.yml b/car-data-server/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..2b9cd55 --- /dev/null +++ b/car-data-server/src/main/resources/bootstrap.yml @@ -0,0 +1,28 @@ +# Tomcat +server: + port: 9801 + +# Spring +spring: + application: + # 应用名称 + name: god-car-data + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: nacos.god.com:8848 + config: + # 配置中心地址 + server-addr: nacos.god.com:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} +logging: + level: + com.god.system.mapper: DEBUG diff --git a/car-data-server/src/main/resources/logback.xml b/car-data-server/src/main/resources/logback.xml new file mode 100644 index 0000000..e3d0200 --- /dev/null +++ b/car-data-server/src/main/resources/logback.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/pom.xml b/pom.xml new file mode 100644 index 0000000..8925b27 --- /dev/null +++ b/pom.xml @@ -0,0 +1,42 @@ + + + + com.god + god-car + 3.6.3 + + pom + + car-data-common + car-data-remote + car-data-server + + 4.0.0 + + 3.6.3 + god-car-data + + + god-car-data车联网数据解析层 + + + + + menghang-public + 梦航-public + http://10.100.1.6:8081/repository/maven-public/ + + + + + + menghang-releases + 梦航-releases + http://10.100.1.6:8081/repository/maven-releases/ + + + + +