I have an entity:
@Entity
@Table(name = "tbl_user")
public class UserEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "user_id")
private Long userId;
The database definition file which I roll by hand to a real database or with spring.datasource.initialize=true to in-memory h2 test (take a look at column name):
CREATE TABLE tbl_user (
uer_id BIGINT PRIMARY KEY AUTO_INCREMENT,
And application.properties definition related to db:
spring.datasource.initialize=false
spring.jpa.hibernate.ddl-auto=validate
hibernate.hbm2ddl.auto=validate
spring.jpa.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.datasource.schema=classpath:sql/app-db-definition.sql
At startup of spring context (in tests too), I want to validate that entity columns mappings match db columns. How do I have to configure it?
spring.jpa.properties.