社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
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})
排除其注入
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!