Exception in thread “main” java.lang.ClassCastException

With multi-dimensional model as the core, let the factory digital transformation and upgrading “within reach”>>>

Exception in thread “main” java.lang.classcastexception is reported when starting springboot

Reason: hot deployment

< dependency>
< groupId> org.springframework.boot</ groupId>
< artifactId> spring-boot-devtools</ artifactId>
</ dependency>

The so-called hot deployment is to upgrade the software while the application is running, but there is no need to restart the application. For Java applications, hot deployment is to update Java class files at runtime. Class loader plays an important role in hot deployment of Java based application server. Most Java based application servers, including EJB servers and servlet containers, support hot deployment. A class loader cannot reload an already loaded class, but it can reload a running application with a new class loader instance

So without it, we can only add a sentence in the configuration file

< optional> true</ optional>

So it works

Similar Posts: