【发布时间】:2023-03-26 01:48:01
【问题描述】:
线程“主”java.lang.ClassCastException 中的异常: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader 不能 转换为 java.base/java.net.URLClassLoader 在 org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:93) 在 org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:56) 在 org.springframework.boot.devtools.restart.Restarter.(Restarter.java:138) 在 org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:537) 在 org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartedEvent(RestartApplicationListener.java:68) 在 org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:45) 在 org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166) 在 org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) 在 org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121) 在 org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:63) 在 org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:48) 在 org.springframework.boot.SpringApplication.run(SpringApplication.java:304) 在 org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) 在 org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) 在 com.rme.hub.RmeApplication.main(RmeApplication.java:24)
【问题讨论】:
-
您的问题能具体一点吗?
-
只有堆栈跟踪是无法回答的。分享你的代码会让事情变得更容易
-
尽管偏离了规则、cmets 和问题的结束,但对于处于相同情况的人来说,问题是明确的。谢谢作者!
标签: spring-boot