package com.excavator.rpc.service.consumer;

import com.excavator.rpc.factory.ClientFactoryBean;
import com.excavator.rpc.service.SayService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@SpringBootApplication
public class RpcServiceConsumerApplication {

    @Value("${zkConnection}")
    private String zkConnection;

    @Value("${serviceName}")
    private String serviceName;

    @Bean
    public SayService clientFactoryBean() throws Exception{
        ClientFactoryBean<SayService> clientFactoryBean = new ClientFactoryBean<>();
        clientFactoryBean.setZkConn(zkConnection);
        clientFactoryBean.setServiceName(serviceName);
        clientFactoryBean.setServiceInterface(SayService.class);

        return clientFactoryBean.getObject();
    }



    public static void main (String [] args) {
        SpringApplication.run(RpcServiceConsumerApplication.class);
    }
}

@@ -123,19 +123,20 @@
 service.
-Say
+Math
 Service;
@@ -682,19 +682,20 @@
  public 
-Say
+Math
 Service 
@@ -758,19 +758,20 @@
 oryBean%3C
-Say
+Math
 Service%3E
@@ -974,11 +974,12 @@
 ace(
-Say
+Math
 Serv

change call SayService -> MathService