내가 그 방법 나는이 프로그램을 실행할 때 나는이 오류 메시지가 무엇 오류 메시지저지 웹 서비스 방법은
SEVERE: Missing dependency for method public java.lang.String com.example.getString(java.lang.Object) at parameter at index 0
SEVERE: Method, public java.lang.String com.example.getString(java.lang.Object), annotated with GET of resource, class com.example.MyServiceClass, is not recognized as valid resource method.
을 얻을
@GET
@Produces(MediaType.TEXT_PLAIN)
public String getString(@QueryParam("path") path) {
return "got the string " + path
}
처럼 보이는 웹 서비스가 유효한 자원의 방법으로 인식되지 평균? param없이 서비스를 실행하면 작동합니다. 내 자신의 질문에 대답
'@ Path' 주석이 있습니까? – Srinivas
클래스 전체에'@ Path'가 있습니다. 서비스에'@GET' 메소드가 하나만있는 경우 개별 메소드에서도 필요합니까? –
사용중인 @Path가 무엇인지 알 수 있습니까? @Path ("/ url/{path}")가이 형식인지 확인하십시오. – Srinivas