Eclipse3.4.1¿ª·¢»ùÓÚSpring2.5+Hibernate3+Struts2ÏîÄ¿

ÏÔʾËùÒÔÓû§·½·¨£¬findById °´ID²éÕÒ·½·¨£¬update¸üз½·¨£»

£¨2£© UserDAOImpl DAOµÄʵÏÖ£¬ÕâÀïʹÓÃÁËHibernateʵÏÖ¶ÔÊý¾Ý¿âµÄ¸÷ÖÖ²Ù×÷£»

Spring ¼Ü¹¹ÕûºÏ

SpringÔÚÏîÄ¿ÖÐÖ÷ÒªÍê³ÉBean´´½¨¡¢¹ÜÀí£»ÓëHibernate3ͨ¹ý¹ÜÀíHibernateµÄÅäÖã¬Êý¾ÝÔ´¡¢SessionFactory·½Ê½ÕûºÏ£¬¸ºÔð½«SessionFactory×¢Èëµ½DAOImpl¶ÔÏóÖУ»Òò´Ë£¬Éè¼ÆÁËÒ»¸öDAOͨÓýӿÚIsessionFactoryIoCÀ´Íê³ÉSessionFactoryÊôÐÔ×¢Èë·½·¨£¬DAOʵÏÖÕâ¸ö½Ó¿ÚÍê¡£ SpringÓëStrutsµÄÕûºÏͨ¹ýStrutsµÄSpring²å¼þÍê³É£¬Struts½«ActionµÄBean½»ÓÉSpring¹ÜÀí£¬ÓÉSpringͨ¹ýIoC·½Ê½×¢È룻

ÏÂÃ濪ʼ±àÂ룺

´´½¨Package com.snsoft.tutorial.dao ºÍcom.snsoft.tutorial.domain

´´½¨Interface

ÏîÄ¿ÖÐÐèÒªÓõ½Struts2¡¢Spring2.5ºÍHibernate3µÄjar°ü£¬½«ÕâЩjar°ü¼°ÆäÒÀÀµjar°ü£¬¸´ÖƵ½¡­.\\MyTutorial\\WebContent\\WEB-INF\\libÄ¿Ï£¬È»ºóË¢ÐÂÒ»ÏÂÏîÄ¿£¨jar°ü·Åµ½WebÓ¦ÓÃlibĿ¼ºó¼´ÒѾ­ÒýÈ빤³ÌÖУ©£»×¢Ò⣺¸´ÖƹýÈ¥¼´¿É£¬ÕâЩjar°ü¼´ÊÇWebÓ¦ÓõÄlib¿â£¬ÓÖÊǹ¤³ÌµÄlib¿â¡£

ʹÓÃHibernate ToolsÉú³É±íµÄORM¶ÔÏ󣬴´½¨Ò»¸öHibernateÅäÖã¨ÔËÐÐʱ²»ÔÙÐèÒª£¬ÎÒÃǽ«Ê¹ÓÃSpringÀ´¹ÜÀíHibernate£©£»Ïêϸ¹ý³ÌÕâÀï²»Öظ´ÁË£¬¿É²Î¿¼http://blog.chinaunix.net/u1/45779/showart_1409209.html

ÏÂÃæ´©²å½éÉÜÒ»ÏÂÈçºÎʹÓÃVSS£¬EclipseÖÐҪʹÓÃVSS½øÐа汾¹ÜÀí±ØÐëÏÈ°²×°VSS²å¼þ¡£Ñ¡Ôñ¹¤³Ì£¬ÓÒ¼ü²Ëµ¥£¬Team£­Share Project ¹²Ïí¹¤³Ì¡£

ÁªÏµ¿Í·þ£º779662525#qq.com(#Ì滻Ϊ@)