idea中解决jar包冲突 java.lang.NoSuchMethodError: org.yaml.snakeyaml.nodes.ScalarNode.getScalarStyle

网上都说是jar包冲突,就打算通过idea的dependents 打开那个密集的maven依赖图,寻找蛛丝马迹。

结果,直接劝退了,太复杂;

17:22:00.943 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.NoSuchMethodError: org.yaml.snakeyaml.nodes.ScalarNode.getScalarStyle()Lorg/yaml/snakeyaml/DumperOptions$ScalarStyle;
	at org.springframework.boot.env.OriginTrackedYamlLoader$KeyScalarNode.<init>(OriginTrackedYamlLoader.java:124)
	at org.springframework.boot.env.OriginTrackedYamlLoader$KeyScalarNode.get(OriginTrackedYamlLoader.java:135)
	at org.springframework.boot.env.OriginTrackedYamlLoader$KeyScalarNode.get(OriginTrackedYamlLoader.java:130)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

  

后来,通过点击控制台错误提示中的代码链接,直接让选择去那个jar包里看代码,立即就找到了是那两个jar包再搞事情。

idea中解决jar包冲突  java.lang.NoSuchMethodError: org.yaml.snakeyaml.nodes.ScalarNode.getScalarStyle

 

 发现是

selenium-server-standalone-3.141.59.jar 这个里面的jar 和Springboot 中的核心包出现冲突;

这个还是在vue的node_modules里

/Users/大爷/StudioProjects/mogu_blog_v2/vue_mogu_web/node_modules/selenium-server/lib/runner/selenium-server-standalone-3.141.59.jar

先删了再说,后台和前端在一个modle里真不行;

上一篇:376. Wiggle Subsequence


下一篇:开发技术-Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags