标题Error querying database. Cause: java.lang.UnsupportedOperationException
报错信息如下
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.UnsupportedOperationException
### The error may exist in file [D:\project\lawCase\target\classes\mapping\AssetsBankaccountsMapper.xml]
### The error may involve com.sinosoft.jwjw.component.mapper.AssetsBankaccountsMapper.getAssetsBankaccountsList
### The error occurred while handling results
### SQL: SELECT ab.ID, ab.USER_GROWTH_PERSONID, ab.ASSETS_BANKACCOUNTS_PERSON_NAME, ab.ASSETS_BANKACCOUNTS_ID_CARD, ab.ASSETS_BANKACCOUNTS_CARD_NUMBER, ab.ASSETS_BANKACCOUNTS_VOUCHER_CARD, ab.REMARK,ab.CARD_TYPE,ab.CARD_STATUS,ab.CARD_KHH,ab.CARD_KHWD,ab.CARD_KHSJ FROM assets_bankaccounts ab WHERE ab.USER_GROWTH_PERSONID=?
### Cause: java.lang.UnsupportedOperationException
经排查发现时xml的resultType写的有问题
xml写的时List
resultType=“java.util.List”
而返回值写的时List< Map>
resultType是返回的语句每一条的类型,所以将resultType="java.util.Map"之后代码完美运行