1.
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManager' defined in class path resource [applicationContext-bean.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut allAddMethod
JDK1.6與Spring2.0中的AspectJ不相容,換成JDK1.5或者下載更高版本的Spring均可解決!
2.
2009-03-12 21:30:07,359 INFO [org.springframework.core.CollectionFactory] - JDK 1.4+ collections available
如果出現這句話,程式就不動了,是由於你的程式目錄和工作空間目錄的命名中含有中文,將他們全部改為字母即可解決!
3.
啟動時報The prefix "aop" for element "aop:config" is not bound
我用的是spring2.5.2
已經把spring.jar,spring-aop.jar,spring-hibernate3.jar,spring-tx.jar,spring-core.jar,cglib-nodep-2.1_3.jar都放進來了 哪位朋友知道是什麼原因造成的嗎? 麻煩請告訴我謝謝!
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">
4.
[com.brilliance.struts.service.impl.InvestServiceImpl] for property 'fundService': no matching editors or conversion strategy found
是你的類沒有實現介面,也可以使用CGLIB來實作類別的動態代理,或者:
在spring事務時會出現。
解決辦法是:
在事務中加上下面語句
<property name="proxyTargetClass" >
<value>true</value>
</property>
表面proxy代理的是類而不是介面。
5.
spring2.5 怎麼沒有spring2.0中的
org.springframework.web.struts.DelegatingActionProxy
2.5對包重新分類了
你是不是直接用的那個2M多的總包
你要找的在spring-framework-2.5.6/dist/modules/spring-webmvc-struts.jar這裡
官方spring-reference跟readme裡都有說明
* "spring-webmvc-struts" (~35 KB)
- Contents: Struts 1.x action support, Tiles 1.x view support
- Dependencies: spring-web, Struts API, (spring-webmvc)