Springboot2+mybatis-plus配置datasource报错 Invalid bound statement (not found)

  1. Check the jar is not the introduction of conflict
  2. Check the scan path Mapper.java
  3. Check the namespace is normal? Check the package scan path typeAliasesPackage is normal? If not scan, MP can not be pre-injection
  4. Check if the primary key? If not specified, will lead selectById related ID does not work, please use the comment @TableId comment table ID primary key. Of course @TableId annotation can not! 5. But your primary key must be called id (ignore case)
  5. Do not use the native SqlSessionFactory, use MybatisSqlSessionFactory

I am a fifth solved

Published 10 original articles · won praise 0 · Views 99

Guess you like

Origin blog.csdn.net/m178643/article/details/103941140