org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): **selectPage

Background: An exception occurred when upgrading to mybatisplus. The common problems of scanning mapper paths and unequal mapping file .xml paths have been eliminated.

Problem: When using mybatisplus’s own method to query the list, org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) appears:

Reason: When the project initializes the SqlSessionFactory configuration, the object of mybatis is still used: SqlSessionFactoryBean sqlSessionFactoryBean = SqlSessionFactoryBean()

Solution: Change to the object used by mybatisplus: MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();

 

Query OK:

 

 
 

Supongo que te gusta

Origin blog.csdn.net/qq_33767353/article/details/128319150
Recomendado
Clasificación