Skip to content

🧪 Play with SpringBoot 2&3, JWT, Querydsl, GraphQL, Docker, ELK, PostgreSQL, MariaDB, Redis, MongoDB, Flyway, Maven, Gradle, TestNG, JUnit5, JaCoCo, GreenMail, CI, Quality Gates, Prometheus, Gatling, etc.

License

Notifications You must be signed in to change notification settings

jonathanlermitage/manon

Repository files navigation

Azure CI Appveyor CI Cirrus CI License

  1. Project
  2. Author
  3. Compilation and test
  4. Tips
  5. License

Project

Some experimentation with Spring Boot 3, JDK17, JUnit5, TestNG, SQL (HSQLDB, MariaDB, PostgreSQL), NoSQL (Redis, MongoDB), Docker, ELK stack, etc. It demonstrates usage of:

For fun and to show some skills 🐱

Author

Jonathan Lermitage (jonathan.lermitage@gmail.com)
Linkedin profile: jonathan-lermitage-092711142

Compilation and test

First, install JDK17+ and Maven3+.

You can now use the ./do Linux Bash script:

do help         show this help message
do fixgit       set executable flag on git index for required files
do fixexec      set executable permission for required files (chmod +x on bash scripts)
do normgit      call git add --update --renormalize
do conv         generate a Dependency Convergence report in target/site/dependency-convergence.html
do oga          check for deprecated groupId and artifactId couples
do owasp        generate a OWASP dependencies vulnerabilities report in target/dependency-check-report.html
do t            test using embedded HSQLDB
do td           test using dockerized MariaDB and Redis (container is started and stopped by script)
do td-postgres  test using dockerized PostgreSQL and Redis (container is started and stopped by script)
do ut           run unit tests only, no integration tests
do tc           run unit + integration tests and generate coverage data
do itc          run integration tests only and generate coverage data
do gatling      benchmark application via a Gatling container (run './do up' first to start application)
do sc           compute and upload Sonar analysis to SonarCloud
do tsc          similar to "do tc" then "do sc"
do sb           scan with SpotBugs then show GUI
do b            build without testing
do c            clean
do p            package application to manon.jar
do rd           package and run application with dev-mariadb profile 
do w 3.5.2      set or upgrade Maven wrapper to 3.5.2
do cv           check plugins and dependencies versions
do uv           update plugins and dependencies versions
do dt           show dependencies tree
do rmi          stop Docker application, then remove its containers and images
do cdi          clean up dangling Docker images
do dockerreset  stop and remove all containers, remove all images and prune volumes
do docker       build Docker image with Dockerfile to a Docker daemon
do dockerpull   pull 3rd party Docker containers
do jib          build Docker image with Jib to a Docker daemon
do jibtar       build and save Docker image with Jib to a tarball
do up           create and start containers via docker-compose
do stop         stop containers via docker-compose
do upelk        create and start ELK containers via docker-compose
do stopelk      stop ELK containers via docker-compose
do upcerebro    create and start Cerebro container via docker-compose
do stopcerebro  stop Cerebro container via docker-compose
do maria        connect to dockerized MariaDB business database by calling MySQL Client provided by container
do maria-batch  connect to dockerized MariaDB Spring Batch database by calling MySQL Client provided by container
do mariah       connect to dockerized MariaDB business database by calling host MySQL Client (mysql-client package must be installed)
do mariah-batch connect to dockerized MariaDB Spring Batch database by calling host MySQL Client (mysql-client package must be installed)
do e2e          run some end-to-end (e2e) tests with Docker. Application image is built from a Dockerfile
do e2ejib       run some end-to-end (e2e) tests with Docker. Application image is built with Jib

Nota: the Linux Bash script can chain parameters, e.g.: ./do cdi rmi w 3.6.0 c tc docker up.
Nota: a Windows do.cmd script exists, but it's limited to some basic features. Run do.cmd help for details.

Tips

Proxy

You may experience connection issues with many do commands that use Maven Wrapper if you are behind a proxy. Maven Wrapper doesn't pick proxy configuration from Maven's settings, so you should give some proxy parameters to JVM. See this excellent Stack Overflow answer.

Git

Some usefull git alias to put into your .gitconfig file:

[alias]

# Show a pretty commit log
ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%C(cyan)\\ [%cn]" --decorate --date=relative

# Checkout a merge request, example: git mr upstream 6
mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -

# Credit an author on the latest commit
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"

# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase -i HEAD~$1; }; r"

# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git diff --patch-with-stat"

License

MIT License. In other words, you can do what you want: this project is entirely OpenSource, Free and Gratis.

About

🧪 Play with SpringBoot 2&3, JWT, Querydsl, GraphQL, Docker, ELK, PostgreSQL, MariaDB, Redis, MongoDB, Flyway, Maven, Gradle, TestNG, JUnit5, JaCoCo, GreenMail, CI, Quality Gates, Prometheus, Gatling, etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages