jersey

jersey return 500 when trying return an XML

我的未来我决定 提交于 2020-12-12 06:54:09
问题 I have a problem with using Jersey 2.29. Its simple example. I managed to return text-plain, but if I trying return XML i get 500 error. My steps: Start server. Go to http://localhost:8080/demorest/webapi/aliens . I I'll get 500. when I rewrote this example to return text-plain, everything was ok. But with XML is a problem. I looked here: Jersey returns 500 when trying to return an XML response But its not work to me. web.xml <?xml version="1.0" encoding="UTF-8"?> <!-- This web.xml file is

[springCloud]Cannot execute request on any known server----eureka

℡╲_俬逩灬. 提交于 2020-11-03 02:27:21
场景:   在启动eureka server时,出现以下错误: (这个错误也不影响启动,每次启动都报这个错误,感觉不太好)  com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect   com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server     at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111) ~[eureka-client-1.6.2.jar:1.6.2] 方法一:   在默认设置下,eureka服务注册中心也会将自己作为客户端来尝试注册它自己,所以我们需要禁用它的客户端注册行为: eureka.instance.hostname=localhost eureka.client.register-with-eureka=false eureka.client.fetch-registry