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:
- [Solved] SpringBoot1.5.10 Project Start Error: Exception in thread “main” java.lang.ClassCastException: class …
- SLF4J: Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path
- Springboot always reports an error when importing JSP dependencies
- [Solved] Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses
- [Solved] Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses
- [Solved] SparkSQL Error: org.apache.hadoop.security.HadoopKerberosName.setRuleMechanism
- Eureka server project startup error handling
- Hibernate Exception: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
- Factory method ‘eurekaClient’ threw exception; nested exception is java.lang.RuntimeException: Failed to initialize DiscoveryClient!
- Springcloud: gateway module startup error