Spring
文章平均质量分 85
feiyu8607
j2ee
展开
-
在Spring中发现java.lang.ClassCastException: $Proxy1问题解析
转载:http://cheneyjuu.blog.163.com/blog/static/41917640201051042941159/碰到这样的错误提示信息一般是spring中AOP代理配置出现问题,在spring中代理的配置基本上有这么两种一种是基于JDK,而另外一种是CGLIB的代理。基于JDK的代理是面向接口的,所有使用 Proxy 的对象都必须定义一个接口,而且用这些对象的代码转载 2011-12-21 22:01:56 · 561 阅读 · 0 评论 -
Spring 声明事务中transactionAttributes属性 + - Exception 实现逻辑
<bean id="userDAOProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> PROPAGATION_REQUIRED PROPAGATION_REQUIRED,readOnly PRO原创 2013-08-24 12:40:16 · 9188 阅读 · 0 评论 -
Spring 中事务管理
Spring 事务管理高级应用难点剖析: 第1 部分(Spring事务介绍)http://www.ibm.com/developerworks/cn/java/j-lo-spring-ts1/文章中注意点:从上面的输入日志中,可以清楚地看到 Spring 为 UserService#logon() 方法启动了一个新的事务,而 UserSerive#updateLastLogonTime原创 2011-06-17 16:26:00 · 873 阅读 · 0 评论 -
Spring Bean Scope Singleton Prototype 相互引用说明
Spring 中默认都是singleton模式,getBean方法调用时都是返回的同一个实例. 如上的配置,虽然beanB配置的是prototype,但由于beanA是singleton,只实例化一次,所以beanA中的beanB每次使用的都是同一个实例,如果需要每次取到beanB的不同实例,可以使用spirng的lo原创 2013-01-07 11:19:34 · 1719 阅读 · 0 评论 -
Spring PropertyPlaceholderConfigurer 自定义扩展
参考:http://seraph115.iteye.com/blog/435165Spring中PropertyPlaceholderConfigurer这个类,它是用来解析Java Properties属性文件值,并提供在spring配置期间替换使用属性值。接下来让我们逐渐的深入其配置。 基本的使用方法是:<bean id="propertyConfigurerForAnalysis原创 2012-12-11 16:12:02 · 20587 阅读 · 1 评论 -
Spring Rmi远程方法调用
http://blog.csdn.net/java2000_wl/article/details/7407073http://zcjl.iteye.com/blog/36336一: 服务端 暴露服务[java] view plaincopyprint?package com.xx.service; /** * 定义远程服务接口 * 1.可以不继承j转载 2012-11-19 16:13:56 · 1975 阅读 · 0 评论 -
Spring中ContextLoderListener、ContextLoaderServlet 与 DispatcherServlet
(一)ContextLoaderListener 与 ContextLoaderServlet本质上是等同的,都是调用ContextLoader来加载web程序的上下文,加载完成以后,都是在ServletContext中,只不过listener需要Servlet2.3及以上支持。 (二)ContextLoaderListene与DispatcherServlet的区别:我们原创 2011-06-08 17:53:00 · 3830 阅读 · 1 评论 -
Spring AfterReturningAdvice Demo
class="usertest.service.impl.UserClientService"> //advice 切面,实现AfterReturningAdvice接口 class="usertest.test.ClientServiceInterceptor"> class="org.springframewo原创 2012-06-02 22:16:18 · 1799 阅读 · 0 评论 -
Spring Jar包详解
spring.jar是包含有完整发布的单个jar包,spring.jar中包含除了 spring-mock.jar里所包含的内容外其它所有jar包的内容,因为只有在开发环境下才会用到spring-mock.jar来进行辅助测试,正式应用系统中是用不得这些类的。 除了spring.jar文件,Spring还包括有其它13个独立的jar包,各自包含着对应的Spring组件,用户可以根据自己的需转载 2011-12-21 22:02:58 · 478 阅读 · 0 评论 -
Spring StoredProcedure Cursor 使用
Java Codeimport java.sql.ResultSet;import java.sql.SQLException;import java.text.DateFormat;import java.text.SimpleDateFormat;import java.util.HashMap;import java.util.List;import java.util.原创 2013-11-07 11:53:10 · 1736 阅读 · 0 评论