| | |
| | | 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
|
| | |
| | | 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){
|
| | |
| | | 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)));
|
| | | }
|
| | | }
|