SoftwareAG / cumulocity-microservice-archetype

Maven archetype for cumulocity microservice. Developed by Global Competency Center IoT
Apache License 2.0
3 stars 1 forks source link

production spring profile #15

Open abrandao-predictiveiq opened 12 months ago

abrandao-predictiveiq commented 12 months ago

Hello!

I am using a run configuration in Eclipse to package a prod version of my microservice created using the microservice archetype. These are the steps I took:

  1. Created Maven profiles with the prod</spring.profiles.active> property
  2. Create a Maven run configuration passing the spring.profiles.active parameter as prod
  3. Set spring.profiles.active=@spring.profiles.active@ in application.properties

But doing only this, the build was complaining about the application name, which seemed to be missing. Then I included the following parameters in application-prod.properties:

application.name application.key C8Y.bootstrap.tenant C8Y.baseURL C8Y.microservice.isolation

This way it worked and my question is: Is this a proper way of configuring the profiles?

Thanks!