error: nested exception is : java.net.UnknownHostException:service-provider:with root cause


找不到这个服务

 解决办法:

降版本

依赖如下
 
        org.springframework.boot
        spring-boot-starter-parent
        2.2.1.RELEASE
         
    
    com.ebiz.han
    nacos-consumer
    0.0.1-SNAPSHOT
    nacos-consumer
    Demo project for Spring Boot
    
        1.8
    
    
        
            org.springframework.boot
            spring-boot-starter-web
        

        
            org.springframework.boot
            spring-boot-starter-test
            test
        
        
            com.alibaba.cloud
            spring-cloud-starter-alibaba-nacos-config
            2.2.1.RELEASE
        
        
            com.alibaba.cloud
            spring-cloud-starter-alibaba-nacos-discovery
            2.2.1.RELEASE