org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题记录

When using mybatis, always meet all kinds of strange problems, the list goes on.

Tried-line summary of the god of various solutions, namespace, id is not on the right, did not add @Mapper comment, or does not work. Finally, go back and look at the configuration of their own projects, find mapper-locationsthe path configured wrong, but small details wrong. Here is my 错误配置:

mybatis-plus:
  mapper-locations: classpath:cn.suvue.discipline.modular.mapper.mapping/*.xml

My path to the front part of the written form of the package path, certainly not right

The correct format is as follows:

mybatis-plus:
  mapper-locations: classpath:cn/suvue/discipline/modular/mapper/mapping/*.xml

This is a problem I encountered my success depends on details, I hope to help you!

Published 39 original articles · won praise 13 · views 2301

Guess you like

Origin blog.csdn.net/weixin_45612794/article/details/103715401