天天看点

解决Error creating bean with name entityManagerFactory defined in class path resource org/spring...问题:说明:解决:

问题:

Error creating bean with name ‘entityManagerFactory’ defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.DuplicateMappingException: The

[com.ihrm.domain.atte.entity.CompanySettings]

and

[com.ihrm.domain.social_security.CompanySettings]

entities share the

same JPA entity name

: [CompanySettings] which is not allowed!

说明:

两个应用模块的数据模型

类名称

重复了。

解决:

两个实体类的@Entity注解加上name属性。

@Entity(name = “atte_company_settings”)

@Entity(name = “ss_company_settings”)

继续阅读