摘要: com.mysql.jdbc.Driver jdbc:mysql://localhost/hibernate root 123456 20 true 50 23 ... 阅读全文
posted @ 2014-03-27 10:22 战宇 阅读(204) 评论(0) 推荐(0) 编辑
摘要: HibernateSessionFactoryUtil类提供了一个getSessionFactory()静态方法。通过调用此方法可以返回一个SessionFactory对象。在其他地方创建Session对象的时候:只需要这样一句代码:Session session = HibernateSessionFactoryUtil.getSessionFactory().getCurrentSession();这样既可获得Session对象。在hibernate.cfg.xml 中加入下列代码:thread注意必须要放在上面HibernateTest类封装了对数据操作更删改查的基本方法。根据不同的业务 阅读全文
posted @ 2014-03-23 11:20 战宇 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 一、框架的流程图 二、运行机制:1.客户端先从Web服务器发送出“*.do/*.action”的http请求到Tomcat。2.将Tomcat创建的request和response传递到ActionServlet(Struts1中的核心控制器,在Struts1中已经集成好了)。3.ActionServlet首先截取URL。4.根据URL取得配置信息。5.创建一个ActionForm。6.把表单数据赋值给ActionForm。7.ActionServlet实例化Action8.ActionServlet将执行创建的Action中的execute(request,response,action.. 阅读全文
posted @ 2014-03-18 21:35 战宇 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Java Hello !!! 阅读全文
posted @ 2013-08-20 11:51 战宇 阅读(143) 评论(0) 推荐(0) 编辑