All the tutorial videos are available on Saggu.uk YouTube channel.
mvn spring-boot:run -DskipTests -Dspring-boot.run.profiles={Profile-Name}
e.g. For Dev
mvn spring-boot:run -DskipTests -Dspring-boot.run.profiles={Profile-Name}
e.g. Different Port
mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8080
mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8090
or
mvn clean install -DskipTests
java -jar target/springboot-tutorial-0.0.1-SNAPSHOT.jar --server.port=8080 --management.server.port=9090
Note: Just enable one cache provider
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>${cache.version}</version>
</dependency>
Add the following:
spring:
cache:
redis:
time-to-live: 100S
type: redis
- docker pull redis
- docker run --name saggu.uk -p 6379:6379 -d redis
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-all</artifactId>
<version>4.2.4</version>
</dependency>
hazelcast:
network:
join:
multicast:
enabled: true
mvn clean -Dflyway.configFiles=src/main/docker/flyway-h2.conf -Dflyway.locations=filesystem:src/main/resources/db/migration/ flyway:migrate
mvn clean -Dflyway.configFiles=src/main/docker/flyway-postgres.conf -Dflyway.url=jdbc:postgresql://localhost:5432/postgres -Dflyway.locations=filesystem:src/main/resources/db/migration/ flyway:migrate
Official doc: https://flywaydb.org/documentation/usage/maven/
Name | Description |
---|---|
migrate | Migrates the database |
clean | Drops all objects in the configured schemas |
info | Prints the details and status information about all the migrations |
validate | Validates the applied migrations against the ones available on the classpath |
undo | Flyway Teams Undoes the most recently applied versioned migration |
baseline | Baselines an existing database, excluding all migrations up to and including baselineVersion |
repair | Repairs the schema history table |
Database > Add New > H2
URL: `jdbc:h2:file:./springboot-tutorial/target/foobar`<br>
UserName: sa<br>
Pwd: <Empty>
Run docker compose up -d
from src/main/docker
folder.
Login to DBeaver