UUID 生成方法

15410年前 (2017-04-17)java技术9284

import java.util.UUID;

/**
     * UUID 生成方法
     * @return uuid
     */
       public static String getUUID(){
            String s = UUID.randomUUID().toString();
            //去掉“-”符号
            return s.substring(0,8)+s.substring(9,13)+s.substring(14,18)+s.substring(19,23)+s.substring(24);
        }

本文原创,转载必追究版权。

分享给朋友:

相关文章

Oracle 数据库cmd命令备份

 //导出exp wsbspt/wsbspt@192.168.1.101/wsbs file=D:/wsbspt.dmp log=D:/wsbspt.txt//导入imp &nbs...

org.tigris.subversion.javahl.ClientException:Attempted to lock an already-locked dir

 svn更新或提交时候报错:org.tigris.subversion.javahl.ClientException:Attempted to lock an already-locke...

get/post方式调用http接口

get/post方式调用http接口

 1. 项目环境如下:myeclipse8.5 、tomcat5.0/weblogic、xp、JDK:开发1.5,编译1.4为了方便,在原来的web项目UpDown中新建了一个httpcal...

get方式调用http接口   Header赋参数值

get方式调用http接口 Header赋参数值

   /**      195.     * 发送...

freeMarker Jfinal 获取session里的值

问题:freeMaker session取值的常用格式都试过 session["xxx"],session.xxx 直接xxx 都取不出来?????解决:JFinal与Struts...

MyEclipse 报错:'Building workspace' has encountered a problem解决方法

MyEclipse 报错:'Building workspace' has encountered a problem解决方法

          每次MyEclipse运行 工作空间报错如下:'Building workspac...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。