☕ 5 Amazingly Comfortable Java Libraries

Tom Smykowski
3 min readFeb 13

Java developers have many wonderful tools to make coding easier. They can map objects, map databases, mockup APIs, work with collections and make connections easily. Check out a list of 5 amazing Java libraries that you can use today in your project.

💎 MapStruct - Map Entities To DTO

MapStruct is compile time, customisable Java Bean mapper that helps to convert entities to DTO. It can be used for example to limit the API response only to the data that are needed improving the performance and lowering the transfer requirements. There is also MapStruct Spring Extensions released just several days ago for Spring framework developers.


Read to the end for an awesome bonus!

💎 jOOQ - Query Database With Strong Typing

jOOQ will sound familiar for C# developers using LINQ. It is a tool that generates structures and methods based on your database Metadata. With that approach you can query your database with SQL-like syntax from within your Java code. It means you don't have to write so much boilerplate, you don't have to replicate database structure.

As well, your IDE will be able to give you more hints about available fields and types as well as informing you when your code becomes desynchronised with the changes made in the database.


Don't forget to subscribe!

💎 WireMock - Fake API Responses

WireMock is a great API mocking library. It is written in Java and used mostly by Java developers. But because it relies on easy to use configuration, it can be used by anyone who has to mock API.

WireMock allows you not also to stub responses by endpoint URL, you can also put it between the client and your existing API. With proxying some of the requests can be still handled by your API server, while others are mocked by WireMock.

Tom Smykowski

Software Engineer & Awarded Tech Editor. Top 2% on StackOverflow, 3mil views on Quora, over 10k followers on Medium. Follow, biz: contact@tomasz-smykowski.com