Exception in thread "main" java.lang.NoSuchMethodError: org.springframework.util.Assert.isInstanceOf(Ljava/lang/Class;Ljava/lang/Object;Ljava/util/function/Supplier;)V
at org.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(LogbackLoggingSystem.java:294)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(LogbackLoggingSystem.java:118)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:232)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:213)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)
at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.lambda$starting$0(SpringApplicationRunListeners.java:53)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:328)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1336)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1325)
at com.boot.DemoBoot.main(DemoBoot.java:9)
是跟着教程来的吗,那应该是环境问题导致的。
判断jar包冲突 在IDEA中使用maven的show dependences,可以很明显看到冲突在哪,这时找到依赖将其中一个排除掉即可
新手玩家直接从spring initializr去创建项目, 要什么依赖自己去选,别自己创建个普通的maven项目去改
java.lang.NoSuchMethodError: org.springframework.util.Assert.isInstanceOf 表示没有找到Assert#isInstanceOf 方法
Assert位于org.springfaramwork.core包, springboot 正常配置都会加载, 你检查下环境中是不是没有, 然后检查自己的配置