<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 303  文章 - 883  trackbacks - 0
    <2007年11月>
    28293031123
    45678910
    11121314151617
    18192021222324
    2526272829301
    2345678

    歡迎光臨! 
    閑聊 QQ:1074961813

    隨筆分類(357)

    我管理的群

    公共blog

    • n維空間
    • Email : java3d@126.com 群 : 12999758

    參與管理的論壇

    好友的blog

    我的其他blog

    朋友的網站

    搜索

    •  

    最新評論

    spring整合hibernate時候往往出現sessionfatory報錯問題,請注意spring整合hibernate的時候最好不要配置HibernateSessionFactory

    下面的代碼使用了HibernateSessionFactory 原因是保留了hinetnate.cfg.xml 我認為也是一種解決辦法


    改代碼使用的數據庫為 oracle10g

     代碼比較長 貼出部分內容 其他的請自己下去看  點擊下載 hibernate_spring.zip

    package com.lusm.vo;

    /**
     * Hello generated by MyEclipse Persistence Tools
     
    */


    public class Hello implements java.io.Serializable {

        
    // Fields

        
    private HelloId id;

        
    // Constructors

        
    /** default constructor */
        
    public Hello() {
        }


        
    /** full constructor */
        
    public Hello(HelloId id) {
            
    this.id = id;
        }


        
    // Property accessors

        
    public HelloId getId() {
            
    return this.id;
        }


        
    public void setId(HelloId id) {
            
    this.id = id;
        }


    }

    package com.lusm.vo;

    /**
     * HelloId generated by MyEclipse Persistence Tools
     
    */


    public class HelloId implements java.io.Serializable {

        
    // Fields

        
    private Long id;
        
    private String name;
        
    private String sex;

        
    // Constructors

        
    /** default constructor */
        
    public HelloId() {
        }


        
    /** full constructor */
        
    public HelloId(Long id, String name, String sex) {
            
    this.id = id;
            
    this.name = name;
            
    this.sex = sex;
        }


        
    // Property accessors

        
    public Long getId() {
            
    return this.id;
        }


        
    public void setId(Long id) {
            
    this.id = id;
        }


        
    public String getName() {
            
    return this.name;
        }


        
    public void setName(String name) {
            
    this.name = name;
        }


        
    public String getSex() {
            
    return this.sex;
        }


        
    public void setSex(String sex) {
            
    this.sex = sex;
        }


        
    public boolean equals(Object other) {
            
    if ((this == other))
                
    return true;
            
    if ((other == null))
                
    return false;
            
    if (!(other instanceof HelloId))
                
    return false;
            HelloId castOther 
    = (HelloId) other;

            
    return ((this.getId() == castOther.getId()) || (this.getId() != null
                    
    && castOther.getId() != null && this.getId().equals(
                    castOther.getId())))
                    
    && ((this.getName() == castOther.getName()) || (this.getName() != null
                            
    && castOther.getName() != null && this.getName()
                            .equals(castOther.getName())))
                    
    && ((this.getSex() == castOther.getSex()) || (this.getSex() != null
                            
    && castOther.getSex() != null && this.getSex().equals(
                            castOther.getSex())));
        }


        
    public int hashCode() {
            
    int result = 17;

            result 
    = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
            result 
    = 37 * result
                    
    + (getName() == null ? 0 : this.getName().hashCode());
            result 
    = 37 * result
                    
    + (getSex() == null ? 0 : this.getSex().hashCode());
            
    return result;
        }


    }

    運行結果
    log4j:WARN No appenders could be found for logger (org.springframework.context.support.FileSystemXmlApplicationContext).
    log4j:WARN Please initialize the log4j system properly.

    Hibernate: select hello0_.ID as ID2_, hello0_.NAME as NAME2_, hello0_.SEX as SEX2_ from LUSM.HELLO hello0_
    id    name    sex
    ---------------

    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男
    123    lusm    男

    如有錯誤或者疑問歡迎留言

    地震讓大伙知道:居安思危,才是生存之道。
    posted on 2007-11-08 11:48 小尋 閱讀(490) 評論(0)  編輯  收藏 所屬分類: j2se/j2ee/j2me
    主站蜘蛛池模板: 亚洲国产高清在线一区二区三区| 91免费精品国自产拍在线不卡| 国产jizzjizz视频全部免费| 亚洲www在线观看| 永久免费av无码网站韩国毛片| 亚洲乱码卡三乱码新区| 免费视频爱爱太爽了| 亚洲国产成人久久99精品| 日本免费xxxx| 国产亚洲玖玖玖在线观看| 久久亚洲国产精品123区| 一级成人毛片免费观看| 亚洲国产一区二区三区| 一个人免费观看www视频| 亚洲日本va午夜中文字幕久久 | 国产免费的野战视频| 亚洲一区视频在线播放| 黄床大片免费30分钟国产精品| 最新国产AV无码专区亚洲| 日韩精品无码免费专区午夜| 久久91亚洲精品中文字幕| 67194国产精品免费观看| 国产成人亚洲综合网站不卡| 四只虎免费永久观看| 成人av片无码免费天天看| 亚洲好看的理论片电影| 中文字幕无码成人免费视频| 无码亚洲成a人在线观看| 一本岛高清v不卡免费一三区| 亚洲午夜一区二区三区| 亚洲?v无码国产在丝袜线观看| 亚洲一区电影在线观看| 国产在线a不卡免费视频| 男女一边桶一边摸一边脱视频免费| 亚洲AV综合色区无码另类小说| 国产免费久久精品99久久| 精品亚洲aⅴ在线观看| 免费观看的av毛片的网站| 三根一起会坏掉的好痛免费三级全黄的视频在线观看 | 无码国产精品一区二区免费vr| 456亚洲人成影院在线观|