Merge pull request #2895 from steverao/2021.x

fix: delete useless codes in example
pull/2910/head
xiaojing 2 years ago committed by GitHub
commit bf89761ad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -44,21 +44,6 @@ public class TestController {
@Autowired @Autowired
private DiscoveryClient discoveryClient; private DiscoveryClient discoveryClient;
// @PostConstruct
// public void init() {
// restTemplate1.setErrorHandler(new ResponseErrorHandler() {
// @Override
// public boolean hasError(ClientHttpResponse response) throws IOException {
// return false;
// }
//
// @Override
// public void handleError(ClientHttpResponse response) throws IOException {
// System.err.println("handle error");
// }
// });
// }
@GetMapping("/echo-rest/{str}") @GetMapping("/echo-rest/{str}")
public String rest(@PathVariable String str) { public String rest(@PathVariable String str) {
return restTemplate.getForObject("http://service-provider/echo/" + str, return restTemplate.getForObject("http://service-provider/echo/" + str,

Loading…
Cancel
Save