-
項目分層 1.實體層 2.數(shù)據庫層 3.接口層 4.借口實現(xiàn)層 (模型層) 5.動作層(控制層) 6.Jsp頁面(視圖層)查看全部
-
第二章 用戶登陸模塊 (1)項目分層 (2)創(chuàng)建MyHibernateSessionFactory (3)設計用戶接口和實現(xiàn)類 (4)設計所有Action父類 (5)設計用戶Action類 (6)頁面調用 (7)顯示相應的報錯信息查看全部
-
<mapping resources="entity/Students.hbm.xml"/> <mapping resources="entity/Users.hbm.xml"/>查看全部
-
使用SchemaExport生成表結構查看全部
-
生成實體類的映射文件 (1)生成Users.hbm.xml文檔 (2)生成Student.hbm.xml文檔查看全部
-
創(chuàng)建實體類 (1)用戶表 (2)學生表查看全部
-
配置hibernate.cfg.xml文件 <property name="connection.username">root</property> <property name="connection.password"></property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql:///test?useUnicode=true&characterEncoding=UTF-8</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="show_sql">true</property> <property name="format_sql">true</property> <property name="hbm2ddl.auto">update</property> <property name="hibernate.current_session_context_class">thread</property> <!-- 使用getCurrentSession方式打開會話 -->查看全部
-
接著;創(chuàng)建struts.xml文檔 最后;配置hibernate.cfg.xml查看全部
-
配置web.xml文件 <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> <!-- /* 表示過濾所有請求> </filter-mapping>查看全部
-
更健康查看全部
-
老師發(fā)表查看全部
-
測試查看全部
-
天天查看全部
-
Struts2與hibernate整合 (1)創(chuàng)建struts2和hibernate用戶類庫 (2)導入struts2與hibernate的jar包 (3)配置web.xml (4)創(chuàng)建struts.xml (5)配置hibernate.cfg.xml查看全部
-
第一張:Struts2與Hibernate整合 Struts2 + Hibernate4 實現(xiàn)的簡單的CRUD案例 實現(xiàn)功能: (1)后臺登錄 (2)學生表的增刪改查 開發(fā)環(huán)境struts2.3.4 + hibernate4.2.4 + MySQL6.0查看全部
舉報
0/150
提交
取消