• 错误:23:36:21.161 [main] ERROR org.springframework.boot.SpringApplication


    详细错误:

     1 23:36:21.161 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
     2 java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
     3     at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:161)
     4     at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:102)
     5     at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:68)
     6     at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
     7     at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
     8     at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
     9     at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
    10     at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
    11     at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
    12     at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:342)
    13     at org.springframework.boot.SpringApplication.run(SpringApplication.java:305)
    14     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
    15     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204)
    16     at mgy.com.springboottest2.SpringbootTest2Application.main(SpringbootTest2Application.java:12)
    17 Disconnected from the target VM, address: '127.0.0.1:63682', transport: 'socket'
    18 
    19 Process finished with exit code 1
    View Code

    问题出现的原因:springboot的版本和springcloud的版本冲突了

    解决方法:

    之前是使用springboot的<version>2.1.7.RELEASE</version>对应springcloud的Edgware.RELEASE
    应改为springboot的<version>2.1.7.RELEASE</version>对应springcloud的Greenwich.SR2
  • 相关阅读:
    Markdown示例
    初识Markdown
    Ubuntu源整理
    Vi编辑器入门
    Ubuntu,Linux入门系统
    [其他]volatile 关键字
    Qt5:随窗口大小变化背景图片自动缩放的实现
    Qt5:不规则按钮的实现---通过贴图实现
    windows编程:创建DLL
    [转]Firefox拦截12306订票网站的解决办法
  • 原文地址:https://www.cnblogs.com/maigy/p/11483982.html
Copyright © 2020-2023  润新知