Problem:
Springboot Start Error:
caused by:org.springframework.beans.factory.BeanCreationException:Error creating bean with Name ' Entitymanagerfactory ' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/ Hibernatejpaautoconfiguration.class]: Invocation of Init method failed; Nested exception is javax.persistence.PersistenceException: [Persistenceunit:default] Unable to build Hibernate Sessionfactory
caused by:javax.persistence.PersistenceException: [Persistenceunit:default] Unable to build Hibernate sessionfactory
Springboot version 1.4.3.RELEASE
Hibernate related properties:
Spring.jpa.hibernate.ddl-auto=validate
Solve:
Configure Application.properties to
spring.jpa.hibernate.naming.physical-strategy= Org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Process:
Configuration
Debug=truespring.jpa.show-sql=true
The note for the log hint @column (name) does not match the database field. Discover the problem.
Reason:
The JPA of Springboot is implemented by hibernate. The physical naming policy naming.physical-strategy the default configuration in Springboot is Org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy.
Put identifier name with Tounderscorecase underline naming rules and convert them once ... It's really counter-intuitive ...
In general, large companies will use the common components based on open source projects themselves to do a set of frameworks, and do not fully play the Springboot "no Configuration" integration of the advantages of the third-party framework, stepping on the pit will be more than the traditional spring a little bit ...
Fix Springboot Unable to build Hibernate sessionfactory @Column naming does not work