The @Id annotation is used to mark a property as the identifier (primary key) of an entity in Hibernate. It can be applied to a field or a getter method. By specifying the @Id annotation, Hibernate knows which property to use as the unique identifier when performing database operations.
The following code shows an example of how to use the @Id annotation:
Code snippet
@Entity
public class Customer
{
}