Java 未在嵌入式码头中找到
我在嵌入式jetty中部署RESTWeb服务(Jersey) 我的服务器:Java 未在嵌入式码头中找到,java,rest,jetty,jersey,embedded-jetty,Java,Rest,Jetty,Jersey,Embedded Jetty,我在嵌入式jetty中部署RESTWeb服务(Jersey) 我的服务器: Map<String,Object> initMap = new HashMap<String, Object>(); initMap.put("com.sun.jersey.api.json.POJOMappingFeature", "true"); initMap.put("com.sun.jersey.config.p
Map<String,Object> initMap = new HashMap<String, Object>();
initMap.put("com.sun.jersey.api.json.POJOMappingFeature", "true");
initMap.put("com.sun.jersey.config.property.packages", "com.extern.rest");
ResourceConfig rc = new PackagesResourceConfig(initMap);
restServer = HttpServerFactory.create("http://localhost:5555/core-gw-rs/", rc);
restServer.start()
当我从客户端执行查询时,作为响应,我收到404状态。当浏览器向同一地址发出请求时,获得所需结果(200状态)
更新
方法:
@GET
@Path("{accountUuid}/domain/rfc822")
public Response fetchData(@PathParam("accountUuid") String accountUuid) {
return Response.ok().build();
}
问题是我在另一台服务器上启动了另一个soap服务(相同的端口,但不同的上下文)。我为什么能够通过浏览器仍然是个谜。你能发布你希望调用的带注释的方法签名吗?
@GET
@Path("{accountUuid}/domain/rfc822")
public Response fetchData(@PathParam("accountUuid") String accountUuid) {
return Response.ok().build();
}