1. 程式人生 > >ERROR 2384 --- [ main] o.s.boot.SpringApplication : Application run failed

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

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}) 排除其注入