I am facing following problem. I have spent more than 3 days on this but cannot find a solution. Please guide me what I am doing wrong here. I am new to Resteasy with wildfl
Base:
(1) http://localhost:8080/admin-ws (I assume `admin-ws` is the app name)
@ApplicationPath("/services") == append /services to Base
(2) http://localhost:8080/admin-ws/services
@Path("/user") == append /user to previous
(3) http://localhost:8080/admin-ws/services/user
@Path("/services/user/getUser") == append /services/user/getUser to previous
(4) http://localhost:8080/admin-ws/services/user/services/user/getUser
//This is the winner with your current set up
What you are using:
http://localhost:8080/admin-ws/services/user/getUser
What's different?
@ApplicationPath("/services")
public class WebConfig extends Application {
}
@Path("/users")
public class UserResource implements Serializable {
@Inject
private UserService userService;
@GET
@Path("/{id}")
@Produces(MediaType.APPLICATION_JSON)
public UserWsPojo getUser(@PathParam("id") String id) {
UserWsPojo uwp = userService.getUserById(id);
return uwp;
}
}
Access:
http://localhost:8080/admin-ws/services/users/12344
// some user id