当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 一. 创建一个POJO 在src/dao/**/model 路径里面 1.创建这个Person确实没有什么难度,呵呵 不过在继承BaseObject的时候麻烦了一点,Matt 介绍了生成 (equals(),hashCode() and toString())的两个Eclipse plugin...
 

 

    摘要: 创建struts action 和 jsp,主要步骤[1] add xdoclet tags to person to generate personform [2] create skeleton jsps using xdoclet [3] create personactiontest to test personaction [4] create personaction [5] run......
 ·[原创] java效验email    »显示摘要«
    摘要: public static boolean isemail ( string email){ string emailchar = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789-_."; string domainchar = "abcdefghijklmnopqrstuvwxyza......


AppFuse1.7 Tutorial 之 CreateDAO (1)
一. 创建一个pojo 在src/dao/**/model 路径里面  1.创建这个person确实没有什么难度,呵呵 不过在继承baseobject的时候麻烦了一点,matt 介绍了生成  (equals(),hashcode() and tostring())的两个eclipse plugin ,我两款都适用了. commonclipse   生成的代码有点错误,没有仔细的研究 不过他目前只是支持eclipse . 使用 commons4e 就没有出现这样的  问题,不过commons4e 不能选择我需要的变量,全部都generate 出来了,在使用的时候可以两个一起根据需要来  使用.  2.(ant setup-db)  after generated getters and setters  就是添加 xdoclet tags 了 , 以前在一个项目中开发ejb的时候也用过xdoclet,理解起来没有什么难度,   也就是在class person 的javadoc上面 @hibernate.class table="person" ,然后就是变量里面的了.xdoclet tags 都必须放到getters 上面的   javadoc里面,这样以后ant build的时候就会在数据库里面生成一个 “person” 的表与相应的字段.  同时在build/dao/gen/**/model下面会生成hibernate o/r mapping(对象与数据关系库的映射)的xml文件(person.hbm.xml)   二.创建daotest -测试驱动开发(ps: 以前在开发的时候没有这么做过,确实觉得挺别扭的.
...   下一页
 ·java.net.portunreachableexception翻译    »显示摘要«
    摘要: <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"><!--newpage--><html><head><!-- generated by javado......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE