package com.emr.controller;

import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.UUID;

/**
 * @ProjectName:
 * @Description:
 * @Param 传输参数
 * @Return
 * @Author: 曾文和
 * @CreateDate: 2019/9/17 14:59
 * @UpdateUser: 曾文和
 * @UpdateDate: 2019/9/17 14:59
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
@Controller
@RequestMapping("contant/")
public class ContantController {
    @RequestMapping("getUuid")
    @ResponseBody
    public String getUuid(HttpServletRequest request){
        String formToken = UUID.randomUUID().toString();
        request.getSession().setAttribute("formToken",formToken);
        return JSON.toJSONString(formToken);
    }
}
