一、注意事项大多数注意事项在代码注释中有明确说明。
(一)Type="json"
当action配置中result的type为json时,实例action中必须将要返回的值的get方法进行重写。因为json不会去追溯action的父类并通过其get方法获取json结果。
(二)Action初始化
实例action中必须有无参数构造方法,在该构造方法中需要对部分参数进行初始化。
(三)Paged.xml增加配置
Paged.xml中需增加配置项remapResults="true",否则将会出现列映射错误。
配置完成后的select标签如下:
<select id="paged.selectPagedInfo" parameterClass="PageInfo"
resultClass="java.util.HashMap" remapResults="true">
(四)Spring事务配置
Context_transaction.xml中需增加如下配置,否则框架的增、删、改操作将无法被纳入spring事务管理范畴中。
<aop:config>
<aop:pointcut id="simpleDBOperation" expression="execution(* com.sinosig.atip.common.simpledb.service.impl.DefaultSimpleDBServImpl.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="simpleDBOperation" />
</aop:config>