Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
471 views
in Technique[技术] by (71.8m points)

spring boot - Heroku add on ever deploy -Dspring.profiles.active=prod

I have 3 application.yml one for dev and one for prod application.yml (default set to dev) application-dev . yml application-prod . yml

When running this command - Dspring.profiles.active=prod it will use my production, how am I able to get this working in heroku?

enter image description here Already tried adding -- spring.profiles.active and - Dspring.profiles.active but both are not recognized is there something that i'm missing?

question from:https://stackoverflow.com/questions/65671969/heroku-add-on-ever-deploy-dspring-profiles-active-prod

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Define a config vars

heroku config:set SPRING_PROFILES_ACTIVE=prod

You can also add it in the Heroku Dashboard (key-value)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...