| | |
| | | |
| | | <dependencies> |
| | | <!-- Spring Cloud 基础 --> |
| | | <dependency> |
| | | <groupId>org.springframework.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-bootstrap</artifactId> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.cloud</groupId>--> |
| | | <!-- <artifactId>spring-cloud-starter-bootstrap</artifactId>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <dependency> |
| | | <groupId>com.iailab</groupId> |
| | |
| | | </dependency> |
| | | |
| | | <!-- Job 定时任务相关 --> |
| | | <dependency> |
| | | <groupId>com.iailab</groupId> |
| | | <artifactId>iailab-common-job</artifactId> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.iailab</groupId>--> |
| | | <!-- <artifactId>iailab-common-job</artifactId>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <!-- 消息队列相关 --> |
| | | <dependency> |
| | |
| | | <artifactId>iailab-common-monitor</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- 三方云服务相关 --> |
| | | <dependency> |
| | | <groupId>com.xingyuv</groupId> |
| | | <artifactId>spring-boot-starter-justauth</artifactId> <!-- 社交登陆(例如说,个人微信、企业微信等等) --> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.github.binarywang</groupId> |
| | | <artifactId>wx-java-mp-spring-boot-starter</artifactId> <!-- 微信登录(公众号) --> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.binarywang</groupId> |
| | | <artifactId>wx-java-miniapp-spring-boot-starter</artifactId> <!-- 微信登录(小程序) --> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>aliyun-java-sdk-core</artifactId> <!-- 短信(阿里云) --> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>aliyun-java-sdk-dysmsapi</artifactId> <!-- 短信(阿里云) --> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.tencentcloudapi</groupId> |
| | | <artifactId>tencentcloud-sdk-java-sms</artifactId> <!-- 短信(腾讯云) --> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.xingyuv</groupId> |
| | | <artifactId>spring-boot-starter-captcha-plus</artifactId> <!-- 验证码,一般用于登录使用 --> |
| | | </dependency> |
| | | |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.iailab</groupId>--> |
| | | <!-- <artifactId>iailab-plat-sdk</artifactId>--> |
| | | <!-- <version>1.0.0</version>--> |
| | | <!-- </dependency>--> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | <!-- 设置构建的 jar 包名 --> |
| | | <finalName>${project.artifactId}</finalName> |
| | | <plugins> |
| | | <!-- 步骤1:在prepare-package阶段加密YAML文件 --> |
| | | <!-- <plugin>--> |
| | | <!-- <groupId>org.apache.maven.plugins</groupId>--> |
| | | <!-- <artifactId>maven-antrun-plugin</artifactId>--> |
| | | <!-- <version>3.0.0</version>--> |
| | | <!-- <executions>--> |
| | | <!-- <execution>--> |
| | | <!-- <id>encrypt-yaml-files</id>--> |
| | | <!-- <phase>prepare-package</phase>--> |
| | | <!-- <goals>--> |
| | | <!-- <goal>run</goal>--> |
| | | <!-- </goals>--> |
| | | <!-- <configuration>--> |
| | | <!-- <target>--> |
| | | <!-- <!– 对target/classes下的所有YAML文件进行Base64编码(实际使用应替换为加密算法) –>--> |
| | | <!-- <echo message="Encrypting YAML files..." />--> |
| | | <!-- <apply executable="base64" dest="${project.build.outputDirectory}" verbose="true">--> |
| | | <!-- <fileset dir="${project.build.outputDirectory}" includes="**/*.yml, **/*.yaml"/>--> |
| | | <!-- <mapper type="glob" from="*" to="*" />--> |
| | | <!-- <srcfile/>--> |
| | | <!-- </apply>--> |
| | | <!-- <!– 实际项目中应使用Java/Groovy脚本实现加密 –>--> |
| | | <!-- </target>--> |
| | | <!-- </configuration>--> |
| | | <!-- </execution>--> |
| | | <!-- </executions>--> |
| | | <!-- </plugin>--> |
| | | <!-- <!– 步骤2:使用ProGuard混淆代码 –>--> |
| | | <!-- <plugin>--> |
| | | <!-- <groupId>com.github.wvengen</groupId>--> |
| | | <!-- <artifactId>proguard-maven-plugin</artifactId>--> |
| | | <!-- <version>2.7.0</version>--> |
| | | <!-- <executions>--> |
| | | <!-- <!– 以下配置说明执行mvn的package命令时候,会执行proguard–>--> |
| | | <!-- <execution>--> |
| | | <!-- <phase>package</phase>--> |
| | | <!-- <goals>--> |
| | | <!-- <goal>proguard</goal>--> |
| | | <!-- </goals>--> |
| | | <!-- </execution>--> |
| | | <!-- </executions>--> |
| | | <!-- <configuration>--> |
| | | <!-- <!– 就是输入Jar的名称,我们要知道,代码混淆其实是将一个原始的jar,生成一个混淆后的jar,那么就会有输入输出。 –>--> |
| | | <!-- <injar>${project.build.finalName}.jar</injar>--> |
| | | <!-- <!– 输出jar名称,输入输出jar同名的时候就是覆盖,也是比较常用的配置。 –>--> |
| | | <!-- <outjar>${project.build.finalName}.jar</outjar>--> |
| | | <!-- <!– 是否混淆 默认是true –>--> |
| | | <!-- <obfuscate>true</obfuscate>--> |
| | | <!-- <putLibraryJarsInTempDir>true</putLibraryJarsInTempDir>--> |
| | | <!-- <!– 配置一个文件,通常叫做proguard.cfg,该文件主要是配置options选项,也就是说使用proguard.cfg那么options下的所有内容都可以移到proguard.cfg中 –>--> |
| | | <!-- <proguardInclude>${project.basedir}/proguard.cfg</proguardInclude>--> |
| | | <!-- <!– 额外的jar包,通常是项目编译所需要的jar –>--> |
| | | <!-- <libs>--> |
| | | <!-- <lib>${java.home}/lib/rt.jar</lib>--> |
| | | <!-- <lib>${java.home}/lib/jce.jar</lib>--> |
| | | <!-- <lib>${java.home}/lib/jsse.jar</lib>--> |
| | | <!-- </libs>--> |
| | | <!-- <!– 对输入jar进行过滤比如,如下配置就是对META-INFO文件不处理。 –>--> |
| | | <!-- <inLibsFilter>!META-INF/**,!META-INF/versions/9/**.class</inLibsFilter>--> |
| | | <!-- <!– 这是输出路径配置,但是要注意这个路径必须要包括injar标签填写的jar –>--> |
| | | <!-- <outputDirectory>${project.basedir}/target</outputDirectory>--> |
| | | <!-- <!–这里特别重要,此处主要是配置混淆的一些细节选项,比如哪些类不需要混淆,哪些需要混淆–>--> |
| | | <!-- <options>--> |
| | | <!-- <!– 可以在此处写option标签配置,不过我上面使用了proguardInclude,故而我更喜欢在proguard.cfg中配置 –>--> |
| | | <!-- </options>--> |
| | | <!-- </configuration>--> |
| | | <!-- </plugin>--> |
| | | <!-- 打包 --> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <!-- |
| | | class-winter插件 |
| | | 注:自Maven3.0.3起, 绑定到同一phase的Maven插件将按照pom.xml中声明的顺序执行 |
| | | 注:此插件最好放置在同一phase的最后执行。 |
| | | 注:此插件不具备打包功能,需要在此插件前有打包插件进行项目打包,否则加密不会生效。 |
| | | --> |
| | | <plugin> |
| | | <groupId>com.idea-aedi</groupId> |
| | | <artifactId>class-winter-maven-plugin</artifactId> |
| | | <version>2.9.6</version> |
| | | <!-- 相关配置 --> |
| | | <configuration> |
| | | <!-- <finalName></finalName>--> |
| | | <includePrefix>com.iailab</includePrefix> |
| | | <originJarOrWar>${project.build.directory}/${project.build.finalName}.jar</originJarOrWar> |
| | | <excludePrefix> |
| | | com.iailab.module.system.SystemServerApplication, |
| | | org.springframework, |
| | | org.apache, |
| | | javax, |
| | | java, |
| | | com.alibaba, |
| | | io.swagger, |
| | | cn.hutool, |
| | | org.yaml.snakeyaml |
| | | </excludePrefix> |
| | | <!-- <includeXmlPrefix></includeXmlPrefix>--> |
| | | <!-- <excludeXmlPrefix></excludeXmlPrefix>--> |
| | | <!-- <toCleanXmlChildElementName></toCleanXmlChildElementName>--> |
| | | <password>123123123</password> |
| | | <!-- <includeLibs></includeLibs>--> |
| | | <!-- <alreadyProtectedRootDir></alreadyProtectedRootDir>--> |
| | | <!-- <alreadyProtectedLibs></alreadyProtectedLibs>--> |
| | | <supportFile>${project.basedir}/dependency/</supportFile> |
| | | <!-- <jvmArgCheck></jvmArgCheck>--> |
| | | <!-- <tips></tips>--> |
| | | <!-- <debug></debug>--> |
| | | </configuration> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>class-winter</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | |
| | | <!-- <plugin>--> |
| | | <!-- <groupId>org.apache.maven.plugins</groupId>--> |
| | | <!-- <artifactId>maven-shade-plugin</artifactId>--> |
| | | <!-- <version>3.2.4</version>--> |
| | | <!-- <executions>--> |
| | | <!-- <execution>--> |
| | | <!-- <phase>package</phase>--> |
| | | <!-- <goals>--> |
| | | <!-- <goal>shade</goal>--> |
| | | <!-- </goals>--> |
| | | <!-- <configuration>--> |
| | | <!-- <transformers>--> |
| | | <!-- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">--> |
| | | <!-- <mainClass>com.iailab.module.system.config.ConfigEncryptor</mainClass>--> |
| | | <!-- </transformer>--> |
| | | <!-- </transformers>--> |
| | | <!-- </configuration>--> |
| | | <!-- </execution>--> |
| | | <!-- </executions>--> |
| | | <!-- </plugin>--> |
| | | |
| | | <!-- <plugin>--> |
| | | <!-- <groupId>org.apache.maven.plugins</groupId>--> |
| | | <!-- <artifactId>maven-dependency-plugin</artifactId>--> |
| | | <!-- <version>3.6.1</version>--> |
| | | <!-- <executions>--> |
| | | <!-- <execution>--> |
| | | <!-- <id>copy-dependencies</id>--> |
| | | <!-- <phase>package</phase>--> |
| | | <!-- <goals>--> |
| | | <!-- <goal>copy-dependencies</goal>--> |
| | | <!-- </goals>--> |
| | | <!-- <configuration>--> |
| | | <!-- <outputDirectory>${project.build.directory}/lib</outputDirectory>--> |
| | | <!-- <overWriteReleases>false</overWriteReleases>--> |
| | | <!-- <overWriteSnapshots>false</overWriteSnapshots>--> |
| | | <!-- <overWriteIfNewer>true</overWriteIfNewer>--> |
| | | <!-- </configuration>--> |
| | | <!-- </execution>--> |
| | | <!-- </executions>--> |
| | | <!-- </plugin>--> |
| | | |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-compiler-plugin</artifactId> |
| | | <configuration> |
| | | <source>${java.version}</source> |
| | | <target>${java.version}</target> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |