package com.jiayue.ssi.util;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
*
*
* @author xsl
* @since 2023/03/01
*/
public class ResponseInfo {
    public static void doResponse(HttpServletResponse response,String message,Integer code){
        response.addHeader("Access-Control-Allow-Origin", "*");
        response.setContentType("text/html;charset=UTF-8");
        response.setStatus(code);
        try {
            response.getWriter().write(message);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
