Setting the default active profile in Spring-boot

前端 未结 14 1880
感动是毒
感动是毒 2020-12-13 08:20

I want my default active profile to be production if -Dspring.profiles.active is not set.

I tried the following in my application.pro

14条回答
  •  执念已碎
    2020-12-13 09:02

    In AWS LAMBDA:

    For $ sam local you add the following line in your sam template yml file:

    Resources:
       FunctionName:
           Properties:
               Environment:
                   Variables:
                      SPRING_PROFILES_ACTIVE: local
    

    But in AWS Console: in your Lambda Environment variables just add:

    KEY:JAVA_TOOL_OPTIONS VALUE:-Dspring.profiles.active=dev

提交回复
热议问题