ssh开源框架日志心得

ssh开源框架日志心得

ID:40572482

大小:71.50 KB

页数:6页

时间:2019-08-04

ssh开源框架日志心得_第1页
ssh开源框架日志心得_第2页
ssh开源框架日志心得_第3页
ssh开源框架日志心得_第4页
ssh开源框架日志心得_第5页
资源描述:

《ssh开源框架日志心得》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、-2、c.f:filter、interceptor、aop-1、springorm插件支持hibernate,是因为前者用到后者的类;struts2-spring插件支持spring,是因为前者用到后者的类。在上面基础上,用相应的配置(文件)描述框架加载及运行中的这种支持0、struts2在哪里指定spring创建action为多例?在哪里指定不用spring时action亦为多例?Interceptor?1、spring装配策略default-autowire="byName",分别在applicationContext.xml、applicationContex

2、t-dao.xml、applicationContext-service.xml写与不写的区别2、spring中dao、service单例,在项目加载时创建;Action多例,每次请求创建(项目加载时不创建)3、

3、bean>(1)"sessionFactory":在DAO中,因为publicclassSortDAOImplextendsHibernateDaoSupportimplementsSortDAO{}publicabstractclassHibernateDaoSupportextendsDaoSupport{privateHibernateTemplatehibernateTemplate;publicfinalvoidsetSessionFactory(SessionFactorysessionFactory){if(this.hibernateTemplate

4、==null

5、

6、sessionFactory!=this.hibernateTemplate.getSessionFactory()){this.hibernateTemplate=createHibernateTemplate(sessionFactory);}}protectedHibernateTemplatecreateHibernateTemplate(SessionFactorysessionFactory){returnnewHibernateTemplate(sessionFactory);}publicfinalSessionFactorygetS

7、essionFactory(){return(this.hibernateTemplate!=null?this.hibernateTemplate.getSessionFactory():null);}publicfinalvoidsetHibernateTemplate(HibernateTemplatehibernateTemplate){this.hibernateTemplate=hibernateTemplate;}publicfinalHibernateTemplategetHibernateTemplate(){returnthis.hibernat

8、eTemplate;}protectedfinalvoidcheckDaoConfig(){if(this.hibernateTemplate==null){thrownewIllegalArgumentException("'sessionFactory'or'hibernateTemplate'isrequired");}}protectedfinalSessiongetSession()throwsDataAccessResourceFailureException,IllegalStateException{returngetSession(this.hib

9、ernateTemplate.isAllowCreate());}protectedfinalSessiongetSession(booleanallowCreate)throwsDataAccessResourceFailureException,IllegalStateException{return(!allowCreate?SessionFactoryUtils.getSession(getSessionFactory(),false):SessionFactoryUtils.getSession(getSessionFactory(),this.hib

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。