本篇内容介绍了“springboot怎么配置多套环境”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
<id>dev
<env>dev
<jvmSettings.initialMemorySize>512
<jvmSettings.maxMemorySize>512
<jvmSettings.javaagent>-javaagent:/data/app/pinpoint-agent-1.8.3/pinpoint-bootstrap-1.8.3.jar
<activeByDefault>true
<id>uat1
<env>uat1
<jvmSettings.initialMemorySize>512
<jvmSettings.maxMemorySize>512
<jvmSettings.javaagent>-javaagent:/data/app/pinpoint-agent-1.8.3/pinpoint-bootstrap-1.8.3.jar
<id>stg
<env>stg
<jvmSettings.initialMemorySize>1024
<jvmSettings.maxMemorySize>1024
<jvmSettings.javaagent>-javaagent:/data/app/pinpoint-agent-1.8.3/pinpoint-bootstrap-1.8.3.jar
<id>prd
<env>prd
<jvmSettings.initialMemorySize>2048
<jvmSettings.maxMemorySize>2048
<jvmSettings.javaagent>-javaagent:/data/app/pinpoint-agent-1.8.3/pinpoint-bootstrap-1.8.3.jar
<directory>src/main/resources
<exclude>env/**
<directory>src/main/resources/env/${env}
<targetPath>${project.build.outputDirectory}
<filtering>true
<directory>src/test/resources
<directory>src/test/resources
<targetPath>${project.build.testOutputDirectory}
<filtering>true
<groupId>org.codehaus.mojo
<artifactId>appassembler-maven-plugin
<version>1.10
<repositoryLayout>flat
<repositoryName>lib
<configurationDirectory>conf
<copyConfigurationDirectory>true
<configurationSourceDirectory>src/main/resources/env/${env}
<includeConfigurationDirectoryInClasspath>true
<target>${project.build.directory}
<id>${project.name}
<mainClass>com.mkl.local.m.MeApplication
<platform>jsw
<wrapperLogFile>logs/${project.name}.log
<generator>jsw
<include>macosx-universal-64
<include>linux-x86-32
<include>linux-x86-64
<include>windows-x86-32
<include>windows-x86-64
<name>configuration.directory.in.classpath.first
<value>conf
<name>set.default.REPO_DIR
<value>lib
<name>wrapper.ping.timeout
<value>300
<name>wrapper.startup.timeout
<value>300
<extraArgument>-Denv=${env}
<extraArgument>-Dspring.profiles.active=${env}
<extraArgument>-server
<extraArgument>-Xms${jvmSettings.initialMemorySize}m
<extraArgument>-Xmx${jvmSettings.maxMemorySize}m
<extraArgument>-Djava.net.preferIPv4Stack=true
并且中间加符号"-" 占一位 预留10个长度给到脚本自动追加hostname 做全局唯一标识 -->
-->
<extraArgument>-XX:+UseG1GC
<extraArgument>-XX:MaxGCPauseMillis=400
<extraArgument>-XX:InitiatingHeapOccupancyPercent=60
<extraArgument>-XX:+PrintGC
<extraArgument>-XX:+PrintGCDetails
<extraArgument>-XX:+PrintGCTimeStamps
<extraArgument>-XX:+PrintGCApplicationConcurrentTime
<extraArgument>-XX:+PrintGCApplicationStoppedTime
<extraArgument>-Xloggc:./logs/gc.log
<extraArgument>-Djava.security.egd=file:/dev/./urandom
<id>generate-jsw-scripts
<phase>package
<goal>generate-daemons
<goal>create-repository
<groupId>org.apache.maven.plugins
<artifactId>maven-assembly-plugin
<version>2.6
<phase>package
<goal>single
<descriptor>assembly/bin.xml
<groupId>org.apache.maven.plugins
<artifactId>maven-deploy-plugin
<version>2.8.2
<skip>true
<groupId>org.apache.maven.plugins
<artifactId>maven-surefire-plugin
<version>2.22.2
<skipTests>true
<groupId>org.springframework.boot
<artifactId>spring-boot-maven-plugin
</build>
“springboot怎么配置多套环境”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。