Category: Featured
Spring Inject Logger by Annotation Example
This tutorial: Spring Inject Logger by Annotation Example show you how to Inject a logger by Annotation. Dependencies We use slf4j logger interface and log4j logger implementation. Next add the spring dependencies to your...
Generic Rest Service Jersey Error Handling
This tutorial explains the best practices how to handle jersey error handling. Basically we create a generic exception handler that will handle all exceptions thrown by any methods inside a rest service. Dependencies Add...
Spring Redis Application Configuration Example
This tutorial shows how to create and configure a Spring Redis Application. We use Java Configuration to configure Spring. Dependencies To start you need to add the following dependencies to your project. <?xml version="1.0"...
JAWR Combine Minify Compress Javascript CSS Files
In this tutorial we will show you how to use JAWR to Combine, Minify and Compress JavaScript/Css Files. This is a really cool library. It does exactly as indicated. It can combine, compress and...
Java SE: Unit Testing CDI with JUnit and JBoss Weld SE
In this tutorial we will show you how to use Java EE Context Dependency Injection in a Java SE environment by Unit Testing CDI with JUnit and JBoss Weld. To enable CDI in our...
Convert IP Address to Geo location in Java
We will show you how you can convert IP Address to Geo Location. MaxMind provides a free Geo database and api. We will explain how you can leverage these to lookup the ip address....
Log4j2 with log4j2.xml Configuration Example
Project structure In the following tutorial we will show you how to configure log4j2 with log4j2.xml file. We will show you how to print the logging to the console and configure log4j2 to print...
JAX-RS JSON Rest Service with Jersey Example
In this tutorial we will show you how you can create a JSON rest service with jersey that will respond with JSON output. This tutorial covers both jersey version 1 and 2. Maven Dependencies...
Configure Multi Module Maven Project with Multiple Sub Modules
Multi Module Maven Project In this tutorial we will show you how to configure a multi module Maven project with multiple sub modules. By using Maven you can leverage all the goodies it provides...