错误描述:
class com.XXX.XXX.entity.XXX cannot be cast to
class com.XXX.XXX.entity.XXX
(com.XXX.XXX.entity.XXXX in unnamed module of loader 'app';
com.XXX.XXX.entity.XXXX is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @26294b2c)
解决方案:
去掉pom.xml文件中下面的这个包.
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>