Quarkus Annotation cheatSheet!!

Learner, Love to make things simple, Full Stack Developer, StackOverflower, Passionate about using machine learning, deep learning and AI
Search for a command to run...

Learner, Love to make things simple, Full Stack Developer, StackOverflower, Passionate about using machine learning, deep learning and AI
No comments yet. Be the first to comment.
Move beyond traditional RESTful thinking. Learn how to design APIs specifically for MCP (Model Context Protocol) servers. This guide covers the shift in mindset, a practical OpenAPI 3.1 example, and a Spring Boot implementation to make your services ...

Extending Kestra to Every Corner of Your Data Stack. Introduction: The Power of Plugins Imagine you're a master chef. You don't just have one knife - you have specialized tools for every task: a paring knife for delicate work, a chef's knife for chop...
Mastering Complex Orchestration Scenarios. Introduction: The Orchestrator's Toolkit Imagine you're conducting a symphony. You don't just wave your baton - you cue sections, adjust tempo, handle surprises, and ensure harmony. That's what advanced work...
From Data Extraction to Loading - A Practical Guide Introduction: Why ETL Still Matters in the Modern Data Stack Remember when data engineering was "extract, transform, load"? Some say ETL is dead, replaced by ELT, reverse ETL, and data mesh. But her...
Building Blocks of Declarative Orchestration. Introduction: The Power of Simplicity Imagine trying to build a house without understanding bricks, beams, and blueprints. That's what using an orchestration tool without understanding its core concepts f...

In this article, you are going to learn some of the most commonly used annotations in Quarkus and their purposes:
@ApplicationScoped: Used to annotate a class whose instances are shared across the entire application. It is a type of CDI scope that defines the lifecycle of the annotated bean to be the same as the lifecycle of the application.
@Singleton: Used to annotate a class whose instances are shared across the entire application. It is a type of CDI scope that defines the lifecycle of the annotated bean to be the same as the lifecycle of the application.
@Inject: Used to annotate a field, constructor parameter, or setter method to indicate that the value of the field or parameter should be injected by CDI.
@Produces: Used to annotate a method that produces a bean to be injected by CDI.
@ConfigProperty: Used to annotate a field, constructor parameter, or setter method to indicate that its value should be injected from the configuration.
@Path: Used to annotate a resource class or method to specify the URI path that should be mapped to the resource.
@GET: Used to annotate a method to indicate that it should handle HTTP GET requests.
@POST: Used to annotate a method to indicate that it should handle HTTP POST requests.
@PUT: Used to annotate a method to indicate that it should handle HTTP PUT requests.
@DELETE: Used to annotate a method to indicate that it should handle HTTP DELETE requests.
@Produces: Used to annotate a method to indicate the media type of the response it produces.
@Entity: Used to annotate a class to indicate that it is a persistent entity in the database.
@Id: Used to annotate a field to indicate that it is the primary key of the entity.
@GeneratedValue: Used to annotate a field to specify the strategy used to generate the primary key value.
@Column: Used to annotate a field to specify the mapping between the entity attribute and the database column.
@Incoming: Used to annotate a method to indicate that it should handle incoming messages from a messaging system.
@Outgoing: Used to annotate a method to indicate that it produces outgoing messages to a messaging system.
@Channel: Used to annotate a method to indicate the name of the messaging channel.
These are just a few of the most commonly used annotations in Quarkus. There are many more annotations available that provide additional functionality, such as caching, security, and metrics.
I hope this helps, you!!
More such articles:
https://www.youtube.com/channel/UCiTaHm1AYqMS4F4L9zyO7qA
\==========================**=========================
If this article adds any value to you then please clap and comment.
Let’s connect on Stackoverflow, LinkedIn, & Twitter.