A blogging platform using Java and Spring Boot.
Install JDK, Maven using SDKMAN
$ curl -s "https://get.sdkman.io" | bash
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
$ sdk install java 21.0.1-tem
$ sdk install gradle
$ sdk install maven
Verify the prerequisites
$ java -version
$ docker info
$ docker compose version
$ ./mvnw verify
You can format the code automatically using spotless-maven-plugin
$ ./mvnw spotless:apply // to formatting code automatically
$ ./mvnw spotless:check // to verify the code formatting
We can use Docker Compose or Testcontainers to start the dependent services like database, mail server, etc.
To start the application using docker-compose:
$ ./mvnw spring-boot:run
To start the application using Testcontainers:
$ ./mvnw spring-boot:test-run
The application is accessible at http://localhost:8080/.