zoukankan      html  css  js  c++  java
  • spring boot jar启动

    1、依赖包输出

    记得禁用热加载

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>copy</id>
                            <phase>install</phase>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <configuration>
                                <outputDirectory> ${project.build.directory}/dependency </outputDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

    2、启动命令

    java -cp
    D:javawork ask argetclasses;D:javawork ask argetdependency* com.qmtt.Application --spring.profiles.active=dev

     3、jvm相关参数考

    $ java -jar -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m -Xms1024m -Xmx1024m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC 1111.jar
     
    -XX:MetaspaceSize=128m (元空间默认大小) 
    -XX:MaxMetaspaceSize=128m (元空间最大大小) 
    -Xms1024m (堆最大大小) 
    -Xmx1024m (堆默认大小) 
    -Xmn256m (新生代大小) 
    -Xss256k (棧最大深度大小) 
    -XX:SurvivorRatio=8 (新生代分区比例 8:2) 
    -XX:+UseConcMarkSweepGC (指定使用的垃圾收集器,这里使用CMS收集器) 
    -XX:+PrintGCDetails (打印详细的GC日志)
    server.tomcat.max-connections=0 # Maximum number of connections that the server accepts and processes at any given time.
    server.tomcat.max-http-header-size=0 # Maximum size, in bytes, of the HTTP message header.
    server.tomcat.max-http-post-size=0 # Maximum size, in bytes, of the HTTP post content.
    server.tomcat.max-threads=0 # Maximum number of worker threads.
    server.tomcat.min-spare-threads=0 # Minimum number of worker threads.
     

    有追求,才有动力!

    向每一个软件工程师致敬!

    by wujf

    mail:921252375@qq.com

  • 相关阅读:
    CentOS 7 如何设置默认启动方式为命令行模式
    Virtual Box配置CentOS7网络
    序列化后成对象转map,再添加到dataList
    centos7 ping: www.baidu.com: Name or service not known
    协议1
    idea查看接口方法实现
    centos关闭防火墙
    myeclipse配置svn
    eas固定ip避免多次申请许可
    jvm配置
  • 原文地址:https://www.cnblogs.com/wujf/p/9104062.html
Copyright © 2011-2022 走看看