idea中spring-mybatis.xml文件Cannot resolve file 'userMapper.xml' annot resolve file 'userMapper.xml' 问题

原因:

<property name="mapperLocations" value="classpath:com/ssm/mapper/userMapper.xml"/>中value配置路径出错。
首先,userMapper.xml文件确实在resources文件夹下的com.ssm.mapper中:

idea中spring-mybatis.xml文件Cannot resolve file 'userMapper.xml' annot resolve file 'userMapper.xml' 问题

所以,在idea中,value应该配为:value="classpath:com.ssm.mapper/userMapper.xml"。如下图:

idea中spring-mybatis.xml文件Cannot resolve file 'userMapper.xml' annot resolve file 'userMapper.xml' 问题

相关文章:

  • 2021-07-16
  • 2021-10-06
  • 2022-12-23
  • 2021-04-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-23
  • 2021-10-28
  • 2021-09-24
  • 2021-12-10
  • 2022-01-20
相关资源
相似解决方案