The Spring Data JDBC @Table annotation maps a domain class to a named relational database table. Unlike javax.persistence.Table, it belongs to Spring Data JDBC. section 15.1
Mapping User to USERS
@Table("USERS") public class User { ... } explicitly associates User with the USERS table. Fields can use Spring Data JDBC @Column annotations for ID, USERNAME, and REGISTRATION_DATE.
A typical mapping works with related Spring Data JDBC annotations and repository infrastructure:
- @Id identifies the entity identifier, while @Column names its corresponding database column. section 15.1
