所以我有一个具有特定路由的Web应用程序:http://localhost:28389/WebServiceTestingAuthentification/webresources/teachers/
这将返回一个测试json对象,如下所示:
我在heroku上部署了该应用程序,但是当我尝试访问相同的路由时,出现404 Not found
错误:
这是我的老师服务:
@Path("teachers")
public class TeacherService {
public TeacherService() {
}
@GET
@Produces({MediaType.APPLICATION_JSON})
public Response getTeachers() throws Exception {
return getResponse(new response.AuthorizationResponse(BaseResponse.SUCCESS, "Hello my private teachers", "jlk"));
}
protected Response getResponse(Object o) {
return Response.ok(o)
.build();
}
}