随笔分类 -  Spring

SpringMVC Controller单例和多例
摘要:对于SpringMVC Controller单例和多例,下面举了个例子说明下. 第一次:类是多例,一个普通属性和一个静态属性。 结果:普通属性:0.............静态属性:0 普通属性:0.............静态属性:1 普通属性:0.............静态属性:2 普通属性: 阅读全文

posted @ 2017-11-01 14:16 struggle_beiJing 阅读(7452) 评论(0) 推荐(1) 编辑

spring与quartz定时器
摘要:参考: http://www.iteye.com/topic/399980 http://www.cnblogs.com/xrab/p/5850186.html 阅读全文

posted @ 2017-07-05 14:50 struggle_beiJing 阅读(190) 评论(0) 推荐(0) 编辑

关于struts和Spring 结合到一起之后存在ACtion创建单实例还是多
摘要:转自(http://www.cnblogs.com/zyzcj/p/5652128.html) struts 2的Action是多实例的并非单例,也就是每次请求产生一个Action的对象。原因是:struts 2的Action中包含数据,例如你在页面填写的数据就会包含在Action的成员变量里面。如 阅读全文

posted @ 2017-03-26 17:14 struggle_beiJing 阅读(227) 评论(0) 推荐(0) 编辑

Spring事务异常回滚,捕获异常不抛出就不会回滚
摘要:最近遇到了事务不回滚的情况,我还考虑说JPA的事务有bug? 我想多了....... 为了打印清楚日志,很多方法我都加tyr catch,在catch中打印日志。但是这边情况来了,当这个方法异常时候 日志是打印了,但是加的事务却没有回滚。 例: 类似这样的方法不会回滚 (一个方法出错,另一个方法不会 阅读全文

posted @ 2017-02-22 17:30 struggle_beiJing 阅读(7911) 评论(0) 推荐(1) 编辑

Spring切面处理
摘要:切面类DictionaryAOP 里面有一个全局变量systemTestDomain <bean id="dictionaryAOP" class="test.DictionaryAOP"> <property name="systemTestDomain"> <ref bean="systemTe 阅读全文

posted @ 2016-12-27 10:35 struggle_beiJing 阅读(315) 评论(0) 推荐(0) 编辑

spring quartz 多次调用
摘要:背景:公司项目有一个定时任务,每月1号0点执行,用到了spring的定时任务。发下定时任务调用的方法执行了俩次。测试部署的客户现场不会有问题 (测试的server.xml不会变化,除非本身提供的tomcat就有一些默认的<context>),而开发本地会有问题 解决:经常排除spring自身没有bu 阅读全文

posted @ 2016-07-27 08:23 struggle_beiJing 阅读(528) 评论(0) 推荐(0) 编辑

spring配置文件中属性mappingLocations、mappingDirectoryLocations
摘要:http://blog.csdn.net/vacblog/article/details/7774173 阅读全文

posted @ 2016-07-07 20:39 struggle_beiJing 阅读(460) 评论(0) 推荐(0) 编辑

Spring处理id相同的bean
摘要:http://www.360doc.com/content/13/1018/05/41237_322247510.shtml(应该可以解决) http://www.2cto.com/kf/201601/487876.html(提供思路,思想) http://blog.csdn.net/caihaij 阅读全文

posted @ 2016-07-02 13:51 struggle_beiJing 阅读(198) 评论(0) 推荐(0) 编辑

关于系统中使用多个PropertyPlaceholderConfigurer的配置(不错)
摘要:http://seraph115.iteye.com/blog/435165 阅读全文

posted @ 2016-07-02 13:46 struggle_beiJing 阅读(280) 评论(0) 推荐(0) 编辑

spring 的 PropertyPlaceholderConfigurer读取的属性怎么访问 (java访问方式,不是xml中的占位符哦)及此类的应用
摘要:一、1.占位符的应用:(@Autowired注解方式,不需要建立set与get方法了,xml注入也不需要写了) http://www.cnblogs.com/susuyu/archive/2012/09/10/2678458.html 二、 2、java方式访问(已经验证过好用) 1、通过sprin 阅读全文

posted @ 2016-07-01 22:52 struggle_beiJing 阅读(2816) 评论(0) 推荐(0) 编辑

ssh配置事务
摘要:http://blog.csdn.net/jianxin1009/article/details/9202907(不错) 阅读全文

posted @ 2016-06-27 22:41 struggle_beiJing 阅读(131) 评论(0) 推荐(0) 编辑

ssh框架配置事务管理器
摘要:http://blog.163.com/zsq303288862@126/blog/static/9374596120111182446727/ 阅读全文

posted @ 2016-06-21 23:57 struggle_beiJing 阅读(624) 评论(0) 推荐(0) 编辑

There is no ID/IDREF binding for IDREF
摘要:http://blog.csdn.net/greensurfer/article/details/7596219 阅读全文

posted @ 2016-06-15 19:25 struggle_beiJing 阅读(1201) 评论(0) 推荐(0) 编辑

Spring通过SchedulerFactoryBean实现调度任务的配置
摘要:http://blog.csdn.net/hu_shengyang/article/details/19815201(里面是配置) 介绍SchedulerFactoryBean http://blog.csdn.net/eagleking012/article/details/7077813 Met 阅读全文

posted @ 2016-06-03 11:10 struggle_beiJing 阅读(16734) 评论(0) 推荐(0) 编辑

属性注入
摘要:Spring的依赖注入不要求bean中一定有属性,只要提供set方法就可以了 阅读全文

posted @ 2016-06-01 14:00 struggle_beiJing 阅读(100) 评论(0) 推荐(0) 编辑

Spring对Hibernate事务管理
摘要:http://www.cnblogs.com/m-xy/archive/2013/05/14/3077627.html(挺好的) 还有一种用parent的配置方式,parent配置到哪个层面,事务就控制在哪 http://blog.csdn.net/z69183787/article/details 阅读全文

posted @ 2016-05-31 18:02 struggle_beiJing 阅读(126) 评论(0) 推荐(0) 编辑

PropertyPlaceholderConfigurer的用法(使用spring提供的类读取数据库配置信息.properties)
摘要:http://www.cnblogs.com/wanggd/archive/2013/07/04/3172042.html(写的很好) 阅读全文

posted @ 2016-05-31 17:01 struggle_beiJing 阅读(279) 评论(0) 推荐(0) 编辑

Spring组件扫描<context:component-scan/>使用详解
摘要:http://blog.csdn.net/a9529lty/article/details/8251003 阅读全文

posted @ 2016-05-27 00:16 struggle_beiJing 阅读(178) 评论(0) 推荐(0) 编辑

Maven搭建Spring+Struts2+Hibernate项目详解
摘要:http://www.bubuko.com/infodetail-648898.html 阅读全文

posted @ 2016-05-22 23:09 struggle_beiJing 阅读(109) 评论(0) 推荐(0) 编辑

struts2与spring整合问题,访问struts2链接时,spring会负责创建Action
摘要:因为: struts2的action每次访问都重新创建一个对象,那spring的ioc是怎么实现注入的呢 ? 靠的是spring给创建的对象。 不知道你的action是在spring容器里还是自己创建的!要是在spring容器中那直接ref就好了。 http://zhidao.baidu.com/l 阅读全文

posted @ 2016-05-20 16:53 struggle_beiJing 阅读(427) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示