package com.gkhy.safePlatform.emergency.controller;
|
|
import com.gkhy.safePlatform.account.rpc.apimodel.NameService;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.log4j.LogManager;
|
import org.apache.log4j.Logger;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RestController;
|
|
@RestController
|
@RequestMapping("/emgc")
|
public class Test {
|
|
@DubboReference(check = false)
|
private NameService nameService;
|
|
// private Logger logger = LogManager.getLogger(Test.class);
|
|
|
@RequestMapping(value = "/t/rpc",method = RequestMethod.GET)
|
public Object testRpc(String id){
|
String resp = nameService.sayName(id);
|
return resp;
|
}
|
}
|