测试接口调试
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package com.sczx.gateway.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.client.ServiceInstance;
|
||||
import org.springframework.cloud.client.discovery.DiscoveryClient;
|
||||
@ -9,6 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class TestController {
|
||||
@Autowired
|
||||
@ -29,7 +31,7 @@ public class TestController {
|
||||
if (instance == null) {
|
||||
return "No instance chosen!";
|
||||
}
|
||||
|
||||
log.info("Chosen instance: {}", instance.getUri());
|
||||
return "Chosen instance: " + instance.getUri();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user