春季3替换法问题
问题描述:
不好意思。我是春天的初学者。现在,它有一些问题。
我在阅读春天在行动并尝试在MyEclipse中的代码。但是当我尝试代码替换方法时,出现错误。
春季3替换法问题
<bean id="harry" class="com.springinaction.sprintidol.Magician">
<property name="magicBox" ref="magicBox" />
<property name="magicWords" value="Bippity boppity boo" />
</bean>
<bean id="magicBox" class="com.springinaction.sprintidol.MagicBoxImpl">
<replaced-method name="getContents" replacer="tigerReplacer" />
</bean>
<bean id="tigerReplacer" class="com.springinaction.sprintidol.TigerReplacer" />
这是applicationContext.xml中。和异常如下:Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stevie' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter
都来自这本书的代码。为什么我会得到异常?以及如何解决?
谢谢。
答
我找到了原因。因为我没有包括Spring 3.0 Persistence Core Libraries
。谢谢你们。