RESTful Java client with RESTEasy client framework
This tutorial show you how to create a RESTful Java client with RESTEasy client framework, to perform “GET” and “POST” requests to REST service that created in last “Jackson +…
RESTful Java client with Apache HttpClient
Apache HttpClient is a robust and complete solution Java library to perform HTTP operations, including RESTful service. In this tutorial, we show you how to create a RESTful Java client…
RESTful Java client with java.net.URL
In this tutorial, we show you how to create a RESTful Java client with Java build-in HTTP client library. It’s simple to use and good enough to perform basic operations…
tinylog Tutorial
This tutorial shows logging in Java application using the tinylog lightweight logging framework. The tinylog is fast; read this benchmark. The tinylog documentation is very detail and organized, make sure…
How to load logging.properties for java.util.logging
In Java Logging APIs or java.util.logging, we use system property java.util.logging.config.file to define the location of the logging.properties file. Normally, we put the logging.properties at the src/main/resources, and project compile…
logging.properties example
The Java logging APIs (java.util.logging) default loads logging.properties in the $JAVA_HOME/jre/lib/ (Java 8 and before); for Java 9 and above, the logging.properties file moved to $JAVA_HOME/conf.
Jersey and HK2 dependency injection (auto scanning)
This article shows how to use HK2 dependency injection framework in Jersey and enable auto-scanning auto-discovery of the declared @Contract and @Service components. Jersey, by default, uses HK2 (Hundred-Kilobyte Kernel)…
JSON example with Jersey + Jackson
This article shows how to return a JSON response in the Jersey application, using Jackson 2.x. Tested with: Jersey 3.0.2, Grizzly 3 HTTP Server, Jackson 2.12.2 , Java 11, Maven,…
XML example with RESTEasy + JAXB
RESTEasy, is required JAXB to support XML file. To use JAXB in RESTEasy, you need to include the “resteasy-jaxb-provider.jar” dependency. In this tutorial, we show you how to create an…
Illegal to inject a message body into a singleton into public org.codehaus.jackson.jaxrs.JacksonJsonProvider
Using Jackson as JSON provider in RESTEasy. With RESTEasy auto scanning enabled. When starting up, it hits following errors and failed to start up any of the RESTEasy services: Illegal…