打包优化
This commit is contained in:
parent
3335a52a22
commit
dea070c6c0
|
@ -39,13 +39,12 @@
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>src/main/webapp/WEB-INF</directory>
|
<directory>src/main/webapp/WEB-INF</directory>
|
||||||
<outputDirectory>./lib/WEB-INF</outputDirectory>
|
<outputDirectory>./WEB-INF</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>./bin</directory>
|
<directory>./bin</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>*.sh</include>
|
<include>*.sh</include>
|
||||||
<include>*.cmd</include>
|
|
||||||
<include>*.bat</include>
|
<include>*.bat</include>
|
||||||
</includes>
|
</includes>
|
||||||
<outputDirectory>./</outputDirectory>
|
<outputDirectory>./</outputDirectory>
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m -Xms1024m -Xmx1024m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC \
|
||||||
|
-Dloader.path=lib,config \
|
||||||
|
-jar -Dfile.encoding=utf-8 -Duser.timezone=GMT+08 -Duser.language=zh -Duser.region=CN ./ms-mcms.jar
|
||||||
|
:: > boot.log 2>&1
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
killall -9 java
|
|
@ -0,0 +1,131 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.2.2.RELEASE</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>net.mingsoft</groupId>
|
||||||
|
<artifactId>ms-mcms</artifactId>
|
||||||
|
<version>5.1-SNAPSHOT</version>
|
||||||
|
<name>ms-mcms</name>
|
||||||
|
<properties>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.mingsoft</groupId>
|
||||||
|
<artifactId>ms-mpeople</artifactId>
|
||||||
|
<version>1.0.25</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- 此部分是铭飞平台MStroe的客户端(MStore不在铭飞开源产品范围),如果不需要使用MStore可以删除掉 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.mingsoft</groupId>
|
||||||
|
<artifactId>store-client</artifactId>
|
||||||
|
<version>3.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<finalName>ms-mcms</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>${java.version}</source>
|
||||||
|
<target>${java.version}</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<!--打包生产-->
|
||||||
|
<configuration>
|
||||||
|
<layout>ZIP</layout>
|
||||||
|
<includes>
|
||||||
|
<include>
|
||||||
|
<groupId>non-exists</groupId>
|
||||||
|
<artifactId>non-exists</artifactId>
|
||||||
|
</include>
|
||||||
|
</includes>
|
||||||
|
<fork>true</fork>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
打包生产
|
||||||
|
-->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-dependencies</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||||||
|
<excludeTransitive>false</excludeTransitive>
|
||||||
|
<stripVersion>false</stripVersion>
|
||||||
|
<includeScope>runtime</includeScope>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>./bin/assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-assembly</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/java</directory>
|
||||||
|
<excludes>
|
||||||
|
<!--打包生产-->
|
||||||
|
<exclude>*.java</exclude>
|
||||||
|
</excludes>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/webapp</directory>
|
||||||
|
<excludes>
|
||||||
|
<!--打包生产-->
|
||||||
|
<exclude>static/**</exclude>
|
||||||
|
<exclude>html/**</exclude>
|
||||||
|
<exclude>upload/**</exclude>
|
||||||
|
<exclude>templets/**</exclude>
|
||||||
|
<exclude>WEB-INF/**</exclude>
|
||||||
|
</excludes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<defaultGoal>compile</defaultGoal>
|
||||||
|
</build>
|
||||||
|
</project>
|
68
pom.xml
68
pom.xml
|
@ -51,75 +51,17 @@
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<!-- 自定义打包 重写包含依赖,包含不存在的依赖,jar里没有pom里的依赖
|
|
||||||
<configuration>
|
|
||||||
<layout>ZIP</layout>
|
|
||||||
<includes>
|
|
||||||
<include>
|
|
||||||
<groupId>non-exists</groupId>
|
|
||||||
<artifactId>non-exists</artifactId>
|
|
||||||
</include>
|
|
||||||
</includes>
|
|
||||||
<fork>true</fork>
|
|
||||||
</configuration>-->
|
|
||||||
</plugin>
|
</plugin>
|
||||||
<!--拷贝第三方依赖文件到指定目录 ${project.build.directory}/lib /lib是依赖jar包的输出目录,根据自己喜好配置
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>copy-dependencies</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-dependencies</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
||||||
<excludeTransitive>false</excludeTransitive>
|
|
||||||
<stripVersion>false</stripVersion>
|
|
||||||
<includeScope>runtime</includeScope>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>-->
|
|
||||||
<!-- 自定义打zip包
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<version>3.1.0</version>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>./assembly/assembly.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>make-assembly</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>-->
|
|
||||||
</plugins>
|
</plugins>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/webapp</directory>
|
<directory>src/main/java</directory>
|
||||||
<excludes>
|
|
||||||
<exclude>static/**</exclude>
|
|
||||||
<exclude>html/**</exclude>
|
|
||||||
<exclude>upload/**</exclude>
|
|
||||||
<exclude>templets/**</exclude>
|
|
||||||
<!-- 管理页面WEB-INF/manger单独配置在jar外面,修改部分ftl避免重新jar打包 -->
|
|
||||||
<!--<exclude>WEB-INF/</exclude>-->
|
|
||||||
</excludes>
|
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/java</directory>
|
<directory>src/main/resources</directory>
|
||||||
<excludes>
|
</resource>
|
||||||
<exclude>**/*.java</exclude>
|
<resource>
|
||||||
</excludes>
|
<directory>src/main/webapp</directory>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<defaultGoal>compile</defaultGoal>
|
<defaultGoal>compile</defaultGoal>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
server:
|
server:
|
||||||
port: 8081
|
port: 8080
|
||||||
servlet.session.timeout: P0DT60M0S #D天H小时M分钟S秒,字符T是紧跟在时分秒之前的,每个单位都必须由数字开始,且时分秒顺序不能乱
|
servlet.session.timeout: P0DT60M0S #D天H小时M分钟S秒,字符T是紧跟在时分秒之前的,每个单位都必须由数字开始,且时分秒顺序不能乱
|
||||||
# ssl: #https证书配置 配置了之后只能通过https访问应用
|
# ssl: #https证书配置 配置了之后只能通过https访问应用
|
||||||
# key-store: ms.pfx 证书文件
|
# key-store: ms.pfx 证书文件
|
||||||
|
@ -13,11 +13,14 @@ logging:
|
||||||
path: log #会在项目的根目录下生成log目录,里面会生成对应的日期目录,日期目录下面生成日志压缩包备份文件,默认按每10M分割一个日志文件,例如:log/2020-01/app-2020-01-03-18.1.log.gz(表示2020年1月3号下午六点的第一个备份),也可以根据实际情况写绝对路径,例如:d:/log
|
path: log #会在项目的根目录下生成log目录,里面会生成对应的日期目录,日期目录下面生成日志压缩包备份文件,默认按每10M分割一个日志文件,例如:log/2020-01/app-2020-01-03-18.1.log.gz(表示2020年1月3号下午六点的第一个备份),也可以根据实际情况写绝对路径,例如:d:/log
|
||||||
|
|
||||||
ms:
|
ms:
|
||||||
|
mstore:
|
||||||
|
http: http://store.new.mingsoft.net
|
||||||
|
host: store.new.mingsoft.net
|
||||||
# scheme: https #解决使用代理服务器代理应用时标签解析域名依旧为http的问题
|
# scheme: https #解决使用代理服务器代理应用时标签解析域名依旧为http的问题
|
||||||
swagger:
|
swagger:
|
||||||
enable: true #启用swagger文档,生产的时候务必关掉
|
enable: true #启用swagger文档,生产的时候务必关掉
|
||||||
manager:
|
manager:
|
||||||
path: /ms #后台访问的路径,如:http://项目/ms/login.do,生成的时候建议修改
|
path: /ms #后台访问的路径,如:http://项目/ms/login.do,生产的时候建议修改
|
||||||
view-path: /WEB-INF/manager #后台视图层路径配置
|
view-path: /WEB-INF/manager #后台视图层路径配置
|
||||||
chcek-code: true #默认开启验证码验证,false验证码不验证
|
chcek-code: true #默认开启验证码验证,false验证码不验证
|
||||||
|
|
||||||
|
@ -66,8 +69,7 @@ spring:
|
||||||
expose-session-attributes: true
|
expose-session-attributes: true
|
||||||
expose-spring-macro-helpers: true
|
expose-spring-macro-helpers: true
|
||||||
prefer-file-system-access: false
|
prefer-file-system-access: false
|
||||||
template-loader-path: classpath:/WEB-INF/manager,classpath:/WEB-INF
|
template-loader-path: file:WEB-INF/,file:WEB-INF/manager,classpath:/,classpath:/WEB-INF/manager,classpath:/WEB-INF
|
||||||
#template-loader-path: file:WEB-INF/,file:WEB-INF/manager,classpath:/,classpath:/WEB-INF/manager,classpath:/WEB-INF 管理页面WEB-INF/manger单独配置在jar外面,修改部分ftl避免重新jar打包
|
|
||||||
settings:
|
settings:
|
||||||
template_update_delay: 1
|
template_update_delay: 1
|
||||||
default_encoding: UTF-8
|
default_encoding: UTF-8
|
||||||
|
|
|
@ -487,7 +487,6 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline-offset: -1px;
|
outline-offset: -1px;
|
||||||
max-width:100%;
|
max-width:100%;
|
||||||
height: 69px;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
display: flex;
|
display: flex;
|
||||||
animation-duration: 1s;
|
animation-duration: 1s;
|
||||||
|
|
Loading…
Reference in New Issue