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)
Virtual Threads in Java 21: Simplified Concurrency for Modern Applications
With Java 21, Virtual Threads have redefined how we approach concurrency, offering a lightweight and efficient way to handle parallel and ...
-
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...
-
Introduction In today's software landscape, designing robust and scalable REST APIs is a crucial aspect of application development. Wit...
-
Spring Boot 3 Spring boot 3 Features : Spring Boot 3.0 will require Java 17 or later Jakarta EE 9 a new top-level jakarta package, replacin...
No comments:
Post a Comment