Correct the classpath of your application so that it contains a single, compatible version of xxx报错

    技术2022-07-10  120

    项目启动时报错:

    Description An attempt was made to call a method that does not exist. The attempt was made from the following location: . . . .省略 . . The method's class, javax.persistence.PersistenceContext, is available from the following locations: file:/E:/maven/sprboot-mysql/lib/javax.persistence.jar Action: Correct the classpath of your application so that it contains a single, compatible version of javax.persistence.PersistenceContext

    原因: file:/E:/maven/sprboot-mysql/lib/javax.persistence.jar 这个文件夹中的jar包冲突

    解决方法: 从file:/E:/maven/sprboot-mysql/lib文件夹中找到冲突的jar包,然后删除。

    Processed: 0.012, SQL: 9