文章目录 1 问题2 解决 1 问题 通过dao插入entity时,报错 org.hibernate.MappingException:Unknown entity 2 解决 增加注解 @EntityScan([“com.lan.*”]),扫描entity所在包即可