异常1:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 3 of method eurekaRegistration in org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration required a bean of type 'com.netflix.appinfo.HealthCheckHandler' that could not be found.
- Bean method 'eurekaHealthCheckHandler' not loaded because @ConditionalOnProperty (eureka.client.healthcheck.enabled) found different value in property 'eureka.client.healthcheck.enabled'
Action:
Consider revisiting the conditions above or defining a bean of type 'com.netflix.appinfo.HealthCheckHandler' in your configuration.
解决方案:
在yml中添加
eureka:
client:
healthcheck:
enabled: true
将enabled 设置为true
异常二:
java.lang.NoClassDefFoundError: org/springframework/boot/actuate/health/HealthAggregator
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
//====================================================
需要如上的jar包,导入即可解决该异常