For local testing
mvn clean test -Dspring.profiles.active=testActivate Profiles Based on Environment Spring Boot can use the spring.profiles.active property to determine which profile-specific configuration to load.
Defaulted to gcp profile
mvn spring-boot:run -Dspring.profiles.active=localFor GCP deployment, the SPRING_PROFILES_ACTIVE environment variable can be set to gcp in your GCP runtime configuration.
Build the project locally:
mvn clean installDeploy to GCP with the correct profile:
mvn clean package
cd target
gcloud app deploy bills-rest-server-0.0.9-SNAPSHOT.jar