내 앱에서 일부 게시물 기능을 구현하려고합니다.AngularJS 400 잘못된 요청
나는 다음 포스트 방법을 가지고있다 :
@POST
@Path("/restrict-single-ip")
public Response RestrictSingleIp(@Valid RestrictLoginAttemptIpRequest requestData, @Context HttpRequest request){
return Response.status(200).build();
}
는 RestrictLoginAttemptIpRequest
클래스를 상속 한 필드 (dataOwnerId
) 유형 :
restrictLoginAttemptsFromSingleIp: function (id, userId) {
var serviceUri = baseServicesUrlService.getBaseServicesUrl() + "/employee-service/restrict-single-ip";
return $http.post(serviceUri, {restrictLoginAttemptIp: {loginAttemptIds: [id]}, dataOwnerId: userId});
}
내 서버 측 최대 절전 모드 유효성 검사 RESTEasy가 3.0.4을 사용하고 있습니다 Long
에서 PostBase
:
public class RestrictLoginAttemptIpRequest extends PostBase {
private RestrictLoginAttemptIp restrictLoginAttemptIp;
public RestrictLoginAttemptIp getRestrictLoginAttemptIp() {
return restrictLoginAttemptIp;
}
public void setRestrictLoginAttemptIp(RestrictLoginAttemptIp restrictLoginAttemptIp) {
this.restrictLoginAttemptIp = restrictLoginAttemptIp;
}
}
RestrictLoginAttemptIp
클래스 : 내가 400 잘못된 요청 오류 때 얻을 이유
{restrictLoginAttemptIp={loginAttemptIds=[328]}, dataOwnerId=8}
누군가가 설명해 주시겠습니까 : 나는 괜찮을 것 같다 POST 요청에서 다음 데이터 문자열을 얻을
package blah;
import org.hibernate.validator.constraints.NotEmpty;
import java.util.List;
public class RestrictLoginAttemptIp {
@NotEmpty(message = "blah")
private List<Long> loginAttemptIds;
public List<Long> getLoginAttemptIds() {
return loginAttemptIds;
}
public void setLoginAttemptIds(List<Long> loginAttemptIds) {
this.loginAttemptIds = loginAttemptIds;
}
}
그 기능을 호출합니까?
Long 데이터 유형이 원인입니까? 어떻게해야할까요? Javascript로 Longs로 표시해야합니까?