Dependencies
An overview of various dependencies used commonly across various projects in the form of categories.
Server
Database
H2
H2 Database offers both in-memory and file-based database options. Integrating H2 database into Maven project involves two main scenarios i.e. using it for persistence in application or for integration testing. Dependency scope as test ensures the dependency is only available during tests and not included in the final packaged application.
H2 database specific properties can be defined in application.yaml file like below.
In-memory: Use
jdbc:h2:mem:your_database_name
for a private in-memory databaseFile-based: Use
jdbc:h2:~/your_database_name
orjdbc:h2:file:your_database_name
to store data in a file on your local system.
Oracle
Oracle Driver
Oracle JDBC driver for Java allows Java applications to connect to Oracle database. It's commonly used when developing Java applications that need to interact with Oracle database.
Oracle database specific properties can be defined in application.yaml file like below.
Mysql
Mysql Driver
Mysql JDBC driver for Java allows Java applications to connect to Mysql database. It's commonly used when developing Java applications that need to interact with Mysql database.
Mysql database specific properties can be defined in application.yaml file like below.
Open API Specification
Tests
Utility
Lombok
Lombok is a Java library that helps reduce boilerplate code by providing annotations to generate getter, setter, constructor, and other utility methods during compilation. This can lead to cleaner and more concise code.
It provides annotations which help reduce boilerplate code for getters, setters, equals, hashCode, , toString, constructors, builders, loggers, checked exceptions handling with @SneakyThrows, data validation with @NonNull to enforce non-null fields etc.
Last updated