Hibernate+Spring搞定Clob、Blob的存取

来源:51cto博客 作者:熔岩 2008-05-12 出处:pcdog.com

.net  hibernate  java  office  oracle  
上一页 1 2 3 4 


    六、书写单元测试,并运行
    /**
     * Created by IntelliJ IDEA.
     * User: leizhimin
     * Date: 2007-11-16

     * Time: 16:49:17
     * To change this template use File | Settings | File Templates.
     */
    public class TestOffice extends TestCase {
        public void test_worknote_save(){
            OfficeService officeService = (OfficeService) ContextHelper.getContext().getBean("officeServiceProxy");
            WorkNote workNote=new WorkNote();
            workNote.setContent("http://lavasoft.blog.51cto.com/");
            workNote.setOrgId(Long.parseLong("999"));
            workNote.setCreateDate(new Date());
            byte[] b="lavasoft".getBytes();
            workNote.setImage(b);
            officeService.saveWorkNote(workNote);
        }
    }

    看看测试结果:

Hibernate+Spring搞定Clob、Blob的存取(图一)
点击查看大图

Hibernate+Spring搞定Clob、Blob的存取(图二)

点击查看大图

看到了吧,存进去了,各位周末愉快!


更多内容请看PCdog.com--Hibernate相关文章  Spring开发技术篇专题
上一页 1 2 3 4 
上一篇:Java技术—IDEA的快捷键介绍
下一篇:Java开发技术是优秀的