高分求救,queryForPaginatedList错误?Lazy loading错误?
<settings
cacheModelsEnabled="true"
enhancementEnabled="true"
lazyLoadingEnabled="true"
errorTracingEnabled="true"
maxRequests="60"
maxSessions="20"
maxTransactions="10"
useStatementNamespaces="true"/>
为什么使用SqlMapClientTemplate.queryForPaginatedList还有报如下错误:
org.springframework.dao.InvalidDataAccessApiUsageException: SqlMapClient needs to have DataSource to allow for lazy loading - specify SqlMapClientFactoryBean's 'dataSource' property
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForPaginatedList(SqlMapClientTemplate.java:280)
at test.dataaccess.DhaInfoDAOImpl.findLw0InfoList(DhaInfoDAOImpl.java:79)
at test.business.DhaInfoBLOImpl.findLw0InfoList(DhaInfoBLOImpl.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy5.findLw0InfoList(Unknown Source)
at test.action.Lw02Action.execute(Lw02Action.java:77)