com.jn.agileway.spring.web.rest.ResponseEntitys Maven / Gradle / Ivy
package com.jn.agileway.spring.web.rest;
import com.jn.langx.annotation.NonNull;
import com.jn.langx.http.rest.RestRespBody;
import com.jn.langx.util.Preconditions;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
public class ResponseEntitys {
public static ResponseEntity fromRestRespBody(@NonNull RestRespBody restRespBody){
Preconditions.checkNotNull(restRespBody);
return new ResponseEntity(restRespBody.getData(), HttpStatus.valueOf(restRespBody.getStatusCode()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy