August 14, 2022

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) for dependency injection. And the HK2 is an implementation of JSR-330(Dependency Injection for Java). For Jersey and HK2 development, we only need to declare jersey-hk2.

Jersey and HK2 dependency injection (auto scanning) Read More

Overview of the core JAX-RS concepts, important annotations

This tutorial presents an overview of the core JAX-RS concepts, important annotations. JAX-RS is Java API for RESTful Web Services (JAX-RS) is a Java programming language API spec that provides support in creating web services according to the Representational State Transfer (REST) architectural pattern. There are two main implementations of JAX-RS API: Jersey Framework and RESTEasy.

Overview of the core JAX-RS concepts, important annotations Read More

Quickstart RESTFul application with Spring Boot and Jersey

Spring is a popular Java application framework for creating enterprise applications. Spring Boot is the next step in evolution of Spring framework. It helps create stand-alone, production-grade Spring based applications with minimal effort. It promotes using the convention over configuration principle over XML configurations. Spring Boot Jersey tutorial shows how to set up a simple RESTFul application with Jersey in a Spring Boot application. Jersey is an alternative to Spring RESTFul applications created with @RestController.

Quickstart RESTFul application with Spring Boot and Jersey Read More