hdw
2018-11-15 7d174fc58bcc9c136548c789fbdf350a3c6fe52b
gx_tieta/src/com/fgkj/actions/ActionUtil.java
@@ -33,7 +33,9 @@
public class ActionUtil extends ActionSupport{
   public static String time_yyyyMMddHHmmss = "yyyy-MM-dd HH:mm:ss";
   
   public final static String CROSS_DOMAIN_KEY   = "44c4a294cb66d13727c14b065dbe8548";      //跨域请求 key
   
   public String key;                                                      //跨域识别码
   
   /*
    * 获取HttpServletRequest
@@ -246,9 +248,6 @@
    return new   SimpleDateFormat( "yyyy-MM-dd HH:mm:ss").format(c.getTime());
    }
    public static void main(String[] args) {
      System.out.println(ActionUtil.EncryptionMD5("vip"));
   }
    
    //获取时间的年份
    public static int getDateYear(Date date){
@@ -475,4 +474,25 @@
       
       return b;
    }
    /**
     * 允许跨域请求
     */
    public static void isAllowHeaders(){
       HttpServletResponse res = getResponse();
      res.setHeader("Access-Control-Allow-Origin", "*");            //允许跨域访问
      res.setHeader("Access-Control-Allow-Headers", "X-Requested-With,content-type,token");
      res.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH");
    }
   public void setKey(String key) {
      this.key = key;
   }
   public static void main(String[] args) {
       String str = "福光电子";
       System.out.println(EncryptionMD5(EncryptionMD5(str)));
   }
}