springboot数据库建表运行后报错:

ERROR 2384 — [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: 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 javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not determine type for: java.util.List, at table: area_table, for columns: [org.hibernate.mapping.Column(son_area)]

解决方法是:

1.打开你的MainApplication.java

2.找到@SpringBootApplication

3.将其改为:

@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐