See full list on baeldung.com
By default, this library will do this using the enum and x-example fields. However, it is more useful to be able to specify your own ids. You can create a handler for each entity. Use annotations to link them to one or more paths. Then, all you need to do is tell the system where to find them. // Define a sequence - might also be in another class: @SequenceGenerator javax.persistence.SequenceGenerator JPA annotation Defines a primary key generator that may be referenced by name when a generator element is specified for the GeneratedValue annotation.