All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jn.agileway.spring.web.rest.ResponseEntitys Maven / Gradle / Ivy

There is a newer version: 3.1.12
Show newest version
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