Run the CustomerServiceApplication
class directly or use Maven:
mvn spring-boot:run -Dspring-boot.run.profiles=dev
or build the JAR and run
mvn package
java -jar -Dspring.profiles.active=dev target/customer-service-spring-data-0.0.1-SNAPSHOT.jar
We can run the application locally using the liquibase
profile. In contrast to the dev
profile,
this will disable automatic schema generation by Hibernate and enable Liquibase ChangeLog Activation.
This will connect to another local database, so we have both databases, one for each profile.
We can use the liquibase-maven-plugin:generateChangeLog
goal to initially generate a sample changelog
from the database that was created by Hibernate. Therefore, we need to activate the liquibase
Maven profile.
mvn liquibase:generateChangeLog -Pliquibase
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Web
- Spring Boot DevTools
- Spring Configuration Processor
The following guides illustrate how to use some features concretely: