Category

#HOWTO

#HOWTO: JPA integration tests with Java EE

Writing good unit tests for your central business logic is essential for the speed of your development and a confident deployment to production. But there are also parts of your application where plain unit tests with mocking frameworks like Mockito aren’t that useful or result in a “mocking-hell”. The interaction of your application with your database is…

Read More

#HOWTO: Convert .docx files to .pdf files format loss-free

Recently I had to convert generated .docx files to .pdf files for a more convenient distribution. The Word documents contained some custom formatting and additional pictures. I tried several Java libraries for doing this job (Docx4j, XDocReport and Apache POI) but all of them couldn’t generate the output I got from manually converting the .docx files with Microsoft Word’s native…

Read More

#HOWTO: Generate documents from Word templates with Docx4j on Wildfly 14

Lately, I had the requirement to generate Word documents from specific templates and fill them dynamically with data. For this task, I compared the following Java libraries: Apache POI, iText PDF, Docx4j and XDocreports.  I compared them while using the following characteristics: Possibility to replace variables, amount of additional dependencies, lines of code to generate…

Read More

#HOWTO: Simple CRUD table with JSF 2.3 and PrimeFaces

As my last blog post about a short intro to JavaServer Faces 2.3 got a lot of attention (my tweet got even retweeted by the Java EE Guardian’s twitter page (@javaee_guardian) I want to continue to write about JSF. Today I’ll cover one of the most common use cases for developing web-based applications: displaying/inserting/updating/deleting data…

Read More

#HOW TO: Lazy Loading of JPA attributes with Hibernate

Modeling your domain model with JPA is quite easy and for a smaller amount of data, you can easily rely on the default configuration of JPA/Hibernate. But when it comes to performance issues in your application you need a deeper understanding of JPA/Hibernate. One big performance boost could be Lazy Loading. When it comes to Lazy Loading,…

Read More

#HOWTO: Expose git information with Spring Boot’s Actuator

In today’s #HOWTO blog post I want to show you a way to expose git information (like commit hash, commit timestamp, branch …) of the deployed application via Spring Boot’s Actuator dependency. If you are not versioning your Maven application with the <version>X.Y.Z</version> tag and you want to know which state of your application is deployed to…

Read More

#HOW TO: Sync Atom editor settings

If you are using the awesome Atom editor from GitHub and working with this editor on several machines and don’t want to manually install and copy all of your downloaded plugins and your settings, this article will improve your productivity! I am using Atom on three different machines (my MacBook, a Desktop PC and my corporate…

Read More