Browse Source

config(mvn,docker):完善mvn和docker镜像配置

dev^2
dashan 1 year ago
parent
commit
6d03f59867
  1. 141
      .gitignore
  2. 14
      .idea/compiler.xml
  3. 15
      .idea/encodings.xml
  4. 2
      .idea/misc.xml
  5. 4
      README.md
  6. 17
      docker/copy.sh
  7. 16
      ds-gateway/pom.xml
  8. 0
      ds-modules/ds-miniapps/ds-miniapps-api/pom.xml
  9. 0
      ds-modules/ds-miniapps/ds-miniapps-model/pom.xml
  10. 0
      ds-modules/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/dummyinfo/DummyInfo.java
  11. 0
      ds-modules/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/dummyinfo/TelecomOperatorsConvert.java
  12. 0
      ds-modules/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/dummyinfo/TelecomOperatorsEnum.java
  13. 0
      ds-modules/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/test/Test.java
  14. 19
      ds-modules/ds-miniapps/ds-miniapps-service/pom.xml
  15. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/DsWebInterceptor.java
  16. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/MiniAppsApplication.java
  17. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/api/dummyinfo/DummyInfoApi.java
  18. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/api/test/TestController.java
  19. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/mapper/test/TestMapper.java
  20. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/service/dummyinfo/DummyInfoService.java
  21. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/service/impl/dummyinfo/DummyInfoServiceImpl.java
  22. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/service/impl/test/TestServiceImpl.java
  23. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/service/test/ITestService.java
  24. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/resources/application.yml
  25. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/main/resources/com/ds/miniapps/mapper/test/TestMapper.xml
  26. 4
      ds-modules/ds-miniapps/ds-miniapps-service/src/test/java/com/ds/miniapps/biz/dummyinfo/DummyInfoServiceTest.java
  27. 0
      ds-modules/ds-miniapps/ds-miniapps-service/src/test/java/com/ds/miniapps/biz/dummyinfo/DummyInfoTest.java
  28. 4
      ds-modules/ds-miniapps/pom.xml
  29. 2
      ds-modules/pom.xml
  30. 40
      pom.xml

141
.gitignore vendored

@ -1,98 +1,49 @@ @@ -1,98 +1,49 @@
# ---> Java
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
# ---> Maven
######################################################################
# Build Tools
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
# Eclipse m2e generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
!.mvn/wrapper/maven-wrapper.jar
######################################################################
# IDE
### STS ###
.apt_generated
.classpath
# ---> JetBrains
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
*.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
docker/*.jar
/.idea/

14
.idea/compiler.xml

@ -11,9 +11,9 @@ @@ -11,9 +11,9 @@
<module name="ds-miniapps-api" />
<module name="ds-mybatisplus-config" />
<module name="ds-basemodel" />
<module name="ds-miniapps-service" />
<module name="ds-web-config" />
<module name="ds-miniapps-model" />
<module name="ds-miniapps-biz" />
<module name="ds-gateway" />
<module name="ds-mybatisplus-support" />
<module name="ds-timer-task" />
@ -25,16 +25,16 @@ @@ -25,16 +25,16 @@
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="dashan-cloud" options="" />
<module name="dashan-cloud" options="-parameters" />
<module name="ds-basemodel" options="-parameters" />
<module name="ds-commons" options="" />
<module name="ds-config" options="" />
<module name="ds-commons" options="-parameters" />
<module name="ds-config" options="-parameters" />
<module name="ds-gateway" options="-parameters" />
<module name="ds-miniapps" options="" />
<module name="ds-miniapps" options="-parameters" />
<module name="ds-miniapps-api" options="-parameters" />
<module name="ds-miniapps-biz" options="-parameters" />
<module name="ds-miniapps-model" options="-parameters" />
<module name="ds-module" options="" />
<module name="ds-miniapps-service" options="-parameters" />
<module name="ds-modules" options="-parameters" />
<module name="ds-mybatisplus-config" options="-parameters" />
<module name="ds-mybatisplus-support" options="-parameters" />
<module name="ds-timer-task" options="-parameters" />

15
.idea/encodings.xml

@ -12,13 +12,14 @@ @@ -12,13 +12,14 @@
<file url="file://$PROJECT_DIR$/ds-commons/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-gateway/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-gateway/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-module/ds-miniapps/ds-miniapps-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-module/ds-miniapps/ds-miniapps-biz/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-module/ds-miniapps/ds-miniapps-model/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-module/ds-miniapps/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-module/ds-miniapps/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-module/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-module/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-modules/ds-miniapps/ds-miniapps-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-modules/ds-miniapps/ds-miniapps-biz/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-modules/ds-miniapps/ds-miniapps-model/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-modules/ds-miniapps/ds-miniapps-service/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-modules/ds-miniapps/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-modules/ds-miniapps/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-modules/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-modules/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ds-timer-task/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />

2
.idea/misc.xml

@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
<option value="$PROJECT_DIR$/ds-module/pom.xml" />
</list>
</option>
</component>

4
README.md

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
# BUILD
- 跳过测试进行打包
```mvn clean compile package -Dmaven.test.skip=true -Pdev```

17
docker/copy.sh

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
#!/bin/sh
# 复制项目的文件到对应docker路径,便于一键生成镜像。
usage() {
echo "Usage: sh copy.sh"
exit 1
}
# copy jar
echo "begin copy ds-gateway "
cp ../ds-gateway/target/ds-gateway.jar ./ds/gateway/jar
echo "begin copy ds-miniapps "
cp ../ds-modules/ds-miniapps/ds-miniapps-service/target/ds-miniapps-service.jar ./ds/modules/miniapps/jar

16
ds-gateway/pom.xml

@ -31,4 +31,20 @@ @@ -31,4 +31,20 @@
<artifactId>spring-cloud-loadbalancer</artifactId>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0
ds-module/ds-miniapps/ds-miniapps-api/pom.xml → ds-modules/ds-miniapps/ds-miniapps-api/pom.xml

0
ds-module/ds-miniapps/ds-miniapps-model/pom.xml → ds-modules/ds-miniapps/ds-miniapps-model/pom.xml

0
ds-module/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/dummyinfo/DummyInfo.java → ds-modules/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/dummyinfo/DummyInfo.java

0
ds-module/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/dummyinfo/TelecomOperatorsConvert.java → ds-modules/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/dummyinfo/TelecomOperatorsConvert.java

0
ds-module/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/dummyinfo/TelecomOperatorsEnum.java → ds-modules/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/dummyinfo/TelecomOperatorsEnum.java

0
ds-module/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/test/Test.java → ds-modules/ds-miniapps/ds-miniapps-model/src/main/java/com/ds/miniapps/entity/test/Test.java

19
ds-module/ds-miniapps/ds-miniapps-biz/pom.xml → ds-modules/ds-miniapps/ds-miniapps-service/pom.xml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>ds-miniapps-biz</artifactId>
<artifactId>ds-miniapps-service</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
@ -52,5 +52,20 @@ @@ -52,5 +52,20 @@
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/java/com/ds/miniapps/DsWebInterceptor.java → ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/DsWebInterceptor.java

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/java/com/ds/miniapps/MiniAppsApplication.java → ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/MiniAppsApplication.java

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/java/com/ds/miniapps/api/dummyinfo/DummyInfoApi.java → ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/api/dummyinfo/DummyInfoApi.java

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/java/com/ds/miniapps/api/test/TestController.java → ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/api/test/TestController.java

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/java/com/ds/miniapps/mapper/test/TestMapper.java → ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/mapper/test/TestMapper.java

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/java/com/ds/miniapps/service/dummyinfo/DummyInfoService.java → ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/service/dummyinfo/DummyInfoService.java

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/java/com/ds/miniapps/service/impl/dummyinfo/DummyInfoServiceImpl.java → ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/service/impl/dummyinfo/DummyInfoServiceImpl.java

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/java/com/ds/miniapps/service/impl/test/TestServiceImpl.java → ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/service/impl/test/TestServiceImpl.java

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/java/com/ds/miniapps/service/test/ITestService.java → ds-modules/ds-miniapps/ds-miniapps-service/src/main/java/com/ds/miniapps/service/test/ITestService.java

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/resources/application.yml → ds-modules/ds-miniapps/ds-miniapps-service/src/main/resources/application.yml

0
ds-module/ds-miniapps/ds-miniapps-biz/src/main/resources/com/ds/miniapps/mapper/test/TestMapper.xml → ds-modules/ds-miniapps/ds-miniapps-service/src/main/resources/com/ds/miniapps/mapper/test/TestMapper.xml

4
ds-module/ds-miniapps/ds-miniapps-biz/src/test/java/com/ds/miniapps/biz/dummyinfo/DummyInfoServiceTest.java → ds-modules/ds-miniapps/ds-miniapps-service/src/test/java/com/ds/miniapps/biz/dummyinfo/DummyInfoServiceTest.java

@ -20,12 +20,12 @@ class DummyInfoServiceTest { @@ -20,12 +20,12 @@ class DummyInfoServiceTest {
@Autowired
private DummyInfoService dummyInfoService;
@Test
// @Test
void randDummyInfo(){
List<DummyInfo> dummyInfos = dummyInfoService.randCreateDummyInfo(1000);
// 写法2
String fileName = "C:\\Users\\21113\\Desktop\\doc\\simpleWrite" + System.currentTimeMillis() + ".xlsx";
String fileName = "D:\\Users\\21113\\Desktop\\doc\\simpleWrite" + System.currentTimeMillis() + ".xlsx";
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
// 如果这里想使用03 则 传入excelType参数即可
EasyExcel.write(fileName, DummyInfo.class).sheet("模板").doWrite(dummyInfos);

0
ds-module/ds-miniapps/ds-miniapps-biz/src/test/java/com/ds/miniapps/biz/dummyinfo/DummyInfoTest.java → ds-modules/ds-miniapps/ds-miniapps-service/src/test/java/com/ds/miniapps/biz/dummyinfo/DummyInfoTest.java

4
ds-module/ds-miniapps/pom.xml → ds-modules/ds-miniapps/pom.xml

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ds</groupId>
<artifactId>ds-module</artifactId>
<artifactId>ds-modules</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
<modules>
<module>ds-miniapps-api</module>
<module>ds-miniapps-model</module>
<module>ds-miniapps-biz</module>
<module>ds-miniapps-service</module>
</modules>
<properties>

2
ds-module/pom.xml → ds-modules/pom.xml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>ds-module</artifactId>
<artifactId>ds-modules</artifactId>
<packaging>pom</packaging>
<modules>
<module>ds-miniapps</module>

40
pom.xml

@ -17,15 +17,15 @@ @@ -17,15 +17,15 @@
<module>ds-gateway</module>
<module>ds-timer-task</module>
<module>ds-commons</module>
<module>ds-module</module>
<module>ds-modules</module>
</modules>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<spring.boot.version>3.1.0</spring.boot.version>
<spring.cloud.version>2022.0.2</spring.cloud.version>
<spring.cloud.alibaba.version>2022.0.0.0-RC2</spring.cloud.alibaba.version>
<spring-boot.version>3.1.0</spring-boot.version>
<spring-cloud.version>2022.0.2</spring-cloud.version>
<spring-cloud-alibaba.version>2022.0.0.0-RC2</spring-cloud-alibaba.version>
<springdoc.version>2.1.0</springdoc.version>
<knife4j.version>4.3.0</knife4j.version>
<mysql.version>8.0.24</mysql.version>
@ -38,21 +38,21 @@ @@ -38,21 +38,21 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud.version}</version>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring.cloud.alibaba.version}</version>
<version>${spring-cloud-alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -103,13 +103,33 @@ @@ -103,13 +103,33 @@
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<!--配置测试开发生产环境-->
<profiles>
<profile>

Loading…
Cancel
Save