Get the App
SLTechnology News&Howtos  ›  Development  › 

How to configure multiple environments for springboot

Shulou Source: shulou.com Published: 2022-06-01 01:02:59 10月04日 Update

This article introduces the knowledge of "how to configure multiple environments in springboot". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Dev

Dev

five hundred and twelve

five hundred and twelve

-javaagent:/data/app/pinpoint-agent-1.8.3/pinpoint-bootstrap-1.8.3.jar

True

Uat1

Uat1

five hundred and twelve

five hundred and twelve

-javaagent:/data/app/pinpoint-agent-1.8.3/pinpoint-bootstrap-1.8.3.jar

Stg

Stg

1024

1024

-javaagent:/data/app/pinpoint-agent-1.8.3/pinpoint-bootstrap-1.8.3.jar

Prd

Prd

2048

2048

-javaagent:/data/app/pinpoint-agent-1.8.3/pinpoint-bootstrap-1.8.3.jar

Src/main/resources

Env/**

Src/main/resources/env/$ {env}

${project.build.outputDirectory}

True

Src/test/resources

Src/test/resources

${project.build.testOutputDirectory}

True

Org.codehaus.mojo

Appassembler-maven-plugin

1.10

Flat

Lib

Conf

True

Src/main/resources/env/$ {env}

True

${project.build.directory}

${project.name}

Com.mkl.local.m.MeApplication

Jsw

Logs/$ {project.name} .log

Jsw

Macosx-universal-64

Linux-x86-32

Linux-x86-64

Windows-x86-32

Windows-x86-64

Configuration.directory.in.classpath.first

Conf

Set.default.REPO_DIR

Lib

Wrapper.ping.timeout

three hundred

Wrapper.startup.timeout

three hundred

-Denv=$ {env}

-Dspring.profiles.active=$ {env}

-server

-Xms$ {jvmSettings.initialMemorySize} m

-Xmx$ {jvmSettings.maxMemorySize} m

-Djava.net.preferIPv4Stack=true

And the middle symbol "-" occupies a bit to reserve 10 lengths for the script to automatically append hostname for global unique identification-- >

->

-XX:+UseG1GC

-XX:MaxGCPauseMillis=400

-XX:InitiatingHeapOccupancyPercent=60

-XX:+PrintGC

-XX:+PrintGCDetails

-XX:+PrintGCTimeStamps

-XX:+PrintGCApplicationConcurrentTime

-XX:+PrintGCApplicationStoppedTime

-Xloggc:./logs/gc.log

-Djava.security.egd=file:/dev/./urandom

Generate-jsw-scripts

Package

Generate-daemons

Create-repository

Org.apache.maven.plugins

Maven-assembly-plugin

2.6

Package

Single

Assembly/bin.xml

Org.apache.maven.plugins

Maven-deploy-plugin

2.8.2

True

Org.apache.maven.plugins

Maven-surefire-plugin

2.22.2

True

Org.springframework.boot

Spring-boot-maven-plugin

This is the end of the content of "how to configure multiple environments for springboot". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Multiple sets environment configuration content more knowledge practicality achievement and then overall situation dilemma reality situation article logo case symbol ribbon website script Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology Huawei Shulou Tech Info Apple