This project is inspired by the idea to quickly create a production ready project with all the required infrastructure at low cost yet with important security measures in place and ability to quickly scale in order to ship a quality product to early adopters. Ideal for quickly starting an app to validate ideas and scale if needed. The implementation includes code samples for different features. It uses Spring as the framework of choice because it provides a nice set of convenience features when bootstrapping and plugging together the application.
By default, the project uses JDK 8, but will also work with JDK 11 and above.
- JDK
-
Oracle
-
Adoptium
-
RedHat
-
- Maven
- Get the latest version from the git repository.
- Run
mvn clean install
to build the project.
Start the Server using " Run Server.main()
" command, selected from the dialog after right click on:
- Main Application class:
com.server.Server
To run the application from command line do following steps
- open
cmd
window - change directory to the root of your microservice project
- run
mvn clean install
to create a jar-file of your microservice. - call
java -jar essentialprogramming-api/target/uber-essentialprogramming-api-1.0.0-SNAPSHOT
from the console
Visit localhost:8080/apidoc
to see the endpoints.
- Change directory to 'db-migration'
- Run
mvn compile flyway:baseline;
mvn compile flyway:migrate;
- https://projectlombok.org/setup/intellij
- Verify that annotation processing is enabled in Intellij (
File
->Settings
->Build, Execution, and Deployment
->Compiler
->Annotation Processers
)
`mvn dependency:tree`
`mvn dependency:tree -Dincludes=net.minidev:json-smart` //Filter the dependency tree
[depgraph-maven-plugin](https://github.com/ferstl/depgraph-maven-plugin) :
`mvn com.github.ferstl:depgraph-maven-plugin:3.3.0:graph -DrepeatTransitiveDependenciesInTextGraph -DshowVersions -DgraphFormat=text -DshowGroupIds -DshowConflicts -DshowDuplicates`
-
JPA(Hibernate) limits: Is your query too complex for JPA and Hibernate ?
-
Native Queries
- Defining and executing native queries
- How to return DTOs from native queries
-
Spring Data JPA
- DTO projections : https://vladmihalcea.com/spring-jpa-dto-projection/
-
Hibernate 6
- Hibernate 6 and JPQL Window Functions: https://vladmihalcea.com/hibernate-jpql-window-functions/
-
JOOQ
-
Getting started:
-
Java, SQL and JOOQ:
-
Hibernate & JOOQ interation:
-
Window functions
-
TOP N Queries
-
DTO projections : https://blog.jooq.org/the-second-best-way-to-fetch-a-spring-data-jpa-dto-projection/
-
-
Blaze Persistence – The Best Way to Write JPA Criteria Queries
-
SQL RANK functions: https://www.sqlshack.com/overview-of-sql-rank-functions/
-
WINDOW functions: https://docs.snowflake.com/en/sql-reference/functions-analytic.html
- Data versioning: https://blog.devgenius.io/what-is-data-versioning-and-3-ways-to-implement-it-4b6377bbdf93
- Data versioning, the Kimball approach:
- SQL Strategies for ‘Versioned’ Data: https://www.red-gate.com/simple-talk/databases/sql-server/database-administration-sql-server/sql-strategies-for-versioned-data/
-
🌀 WSL 2: https://www.freecodecamp.org/news/how-to-install-wsl2-windows-subsystem-for-linux-2-on-windows-10/
-
🌀 Java Decompiler: http://java-decompiler.github.io/
-
🌀 JWT Decoder, Verifier, Generator, Decryptor: https://dinochiesa.github.io/jwt/
- git update-ref -d refs/original/refs/remotes/origin/master
- git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin
- git reflog expire --expire=now --all
- git gc --aggressive --prune=now
- 🌀 How To Secure Nginx with Let's Encrypt: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04
- 🌀 Using Free Let’s Encrypt SSL/TLS Certificates with NGINX: https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/