I share example how to add profile in spring boot with maven.
For example :
1. I add 3 profiles on pom.xml by default profile prod is active.
-local
-dev
-prod
2. Also add on pom.xml on section <build></build>
3. Add 3 file on Spring boot project src/main/resources, each file is one profile.
4. Add into application.properties
5. if you want change profile create file application.yml and write:
In the image the local is the profile active if you change, change the position the profile. the concepts is similar a pile. if you don't want to create file application.yml then into the application.properties (spring.profiles.active=prod).
that is it.
Subscribe to:
Post Comments (Atom)
Automating Deployments with CronJobs in Google Kubernetes Engine (GKE)
In the realm of container orchestration, automation plays a pivotal role in streamlining operations. Google Kubernetes Engine (GKE) offers r...
-
SAML V2.0 SAML version 2.0 was approved as an OASIS Standard in March 2005. Approved Errata for SAML V2.0 was last produced by the SSTC on 1...
-
Single Sign-On (SSO) is an authentication process that allows users to access multiple applications or services with a single set of login c...
-
Introduction: Sometimes we need to interact with Spring Boot GraphQL API and Spring Boot Rest API in the same time, in this case we can use ...
No comments:
Post a Comment