Luoqian00 2022-01-27 11:49 采纳率: 100%
浏览 60
已结题

sqlSessionFactory构建时出现问题

在SqlSession sqlSession = sqlSessionFactory.openSession();中传递了TRUE之后build就开始报错了

报错代码:
org.apache.ibatis.exceptions.PersistenceException:

Error building SqlSession.

The error may exist in com/itheima/mapper/BrandMapper.xml

The error occurred while processing mapper_resultMap[brandResultMap]

Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'com/itheima/mapper/BrandMapper.xml'. Cause: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}

img

  • 写回答

3条回答 默认 最新

  • CSDN专家-sinJack 2022-01-27 11:55
    关注

    com/itheima/mapper/BrandMapper.xml中存在问题,看下里面的配置。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 6月19日
  • 已采纳回答 6月11日
  • 修改了问题 6月9日
  • 修改了问题 1月27日
  • 展开全部