33import com .codingapi .tm .Constants ;
44import com .codingapi .tm .config .ConfigReader ;
55import com .codingapi .tm .framework .utils .SocketManager ;
6- import com .codingapi .tm .manager .service .EurekaService ;
6+ import com .codingapi .tm .manager .service .MicroService ;
77import com .codingapi .tm .model .TxServer ;
88import com .codingapi .tm .model .TxState ;
99import com .netflix .appinfo .InstanceInfo ;
2525 * create by lorne on 2017/11/11
2626 */
2727@ Service
28- public class EurekaServiceImpl implements EurekaService {
28+ public class MicroServiceImpl implements MicroService {
2929
3030
3131 @ Autowired
@@ -39,11 +39,14 @@ public class EurekaServiceImpl implements EurekaService{
3939 private DiscoveryClient discoveryClient ;
4040
4141
42+ @ Autowired
43+ private EurekaClient eurekaClient ;
44+
45+
4246
43- private final static String tmKey = "tx-manager" ;
4447
4548 /** logger */
46- private static final Logger logger = LoggerFactory .getLogger (EurekaServiceImpl .class );
49+ private static final Logger logger = LoggerFactory .getLogger (MicroServiceImpl .class );
4750
4851
4952 private boolean isIp (String ipAddress ) {
@@ -54,9 +57,6 @@ private boolean isIp(String ipAddress) {
5457 }
5558
5659
57- @ Autowired
58- private EurekaClient eurekaClient ;
59-
6060 public List <InstanceInfo > getConfigServiceInstances () {
6161 Application application = eurekaClient .getApplication (tmKey );
6262 if (application == null ) {
0 commit comments