org.springframework.boot.builder.SpringApplicationBuilder.([Ljava/lang/Object;)V
程序员文章站
2024-02-22 15:43:22
...
21:03:46.843 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:161)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:102)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:68)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:338)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:297)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230)
at com.learn.springcloud.MicroserviceDiscoveryEurekaApplication.main(MicroserviceDiscoveryEurekaApplication.java:12)
Disconnected from the target VM, address: '127.0.0.1:14075', transport: 'socket'
新建eureka server,启动报错。
原因:SpringBoot版本问题,eureka对SpringBoot 2.x版本支持有问题,需要切换到1.x版本。
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
修改为:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
上一篇: SATA数据线接口-实在是败笔 制造
下一篇: postfix报错postfix: fatal: parameter inet_interfaces: no local interface found for ::1
推荐阅读
-
java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.([Ljava
-
org.springframework.boot.builder.SpringApplicationBuilder.
([Ljava/lang/Object;)V -
java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.([Ljava
-
spring-cloud 启动报错 NoSuchMethodError: SpringApplicationBuilder.<init>([Ljava/lang/Class;)V
-
关于Object数组强转成Integer数组的问题:Ljava.lang.Object; cannot be cast to [Ljava.lang.Integer;
-
net.sf.json.JSONArray cannot be cast to [Ljava.lang.Object
-
真正解决java.lang.NoSuchMethodError: org.springframework.util.Assert.notNull(Ljava/lang/Object;Ljava/uti
-
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.
(I)V报错解决 -
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.
(I)V报错解决 -
关于Object数组强转成Integer数组的问题:Ljava.lang.Object; cannot be cast to [Ljava.lang.Integer;