Home » annotations

Tag Archives: annotations

Jackson Annotation Examples

This example is a deep dive into Jackson Annotations. It covers almost all the annotations with code examples. We will learn how to use the existing annotations, create our custom annotations and finally how to completely disable Jackson annotations. If you are new to the Jackson API for JSON serialization and deserialization, check out this article on Introduction to Jackson ...

Read More »

Spring @AliasFor Annotation Example

In this example, we will show how to use the @AliasFor annotation in Spring. 1. Introduction Annotations are decorators that provide metadata about classes, methods, parameters or fields. Depending on the annotation, metadata may be processed at compile-time and/or runtime. Examples of annotations include: JUnit annotations (@Test, @Before, @After)JPA annotations (@Entity, @Table, @Id)Spring Framework annotations (@Controller, @Configuration, @Autowired) Meta-annotations are ...

Read More »

Java 9 Annotations Example

In this article we will cover the topic of annotations by way of some theory and a brief example using Java 9. We will cover what they are, their properties, their purpose and different types. The example code will demonstrate the application of an annotation processor using custom annotations on an interface to automatically generate a stub implementation of said interface. ...

Read More »

JAX-RS Annotations Explained

In this example we shall learn some important JAX-RS annotations. To understand this tutorial, following is the prerequisite knowledge required: Basic knowledge of how to use annotations Basic REST Architecture Table Of Contents 1. JAX-RS Annotations 1.1. @Path 1.2. @PathParam 1.3. @GET 1.4. @POST 1.5. @PUT 1.6. @DELETE 1.7. @Consumes 1.8. @Produces 1.9. @QueryParam 2. Download the source code 1. ...

Read More »