Some students encountered the problem of “Invalid bound statement (not found)” when building the mybatis plus project, it is essentially that the mapper interface and the mapper.xml is not mapped.
In this case, the common problems are as follows:
1, mapper.xml inside the namespace and the actual mapper class path is not consistent.
There is a quick way to detect this is to hold down the ctrl key, and then click the package name inside the namespace, if you can jump to the corresponding class, it means there is no problem, if you use the IDEA is the same way, IDEA package name can be segmented, as long as you can point in are no problem.
2, mapper interface function name and mapper.xml inside the label id is not consistent.
This problem is also very common, the best way is to paste and copy it, so as to ensure that there is no problem.
The first point and 2 points are about spelling errors.
3, the build did not go in, please see if these exist below the target folder, no please rebuild
4. Check whether package scanning is added. I added it to the spring boot startup class.
5. Check whether the configuration file is written incorrectly or not
#Is this place wrongly written?
Mybatis-plus can be configured as an array:
mybatis-plus: mapper-locations: - classpath:mybatis/mapper/**/*.xml
mybatis-plus: mapper-locations: classpath:mybatis/**/*Mapper.xml
Note that the key is mapper-locations and not mapper-locations:
mybatis-plus: global-config: #primary-key-type 0: "Database ID self-incrementing", 1: "User input ID", 2: "Global unique ID (numeric unique ID)", 3: "Global unique ID UUID"; id-type: 0 #field-strategy 0: "Ignore judgment",1: "Non-NULL judgment"),2: "Non-Null judgment" field-strategy: 0 #hump-underline conversion db-column-underline: true #refresh-mapper debugging artifact refresh-mapper: true #database capital-underline conversion #capital-mode: true #sequence interface implementation class configuration #key-generator: com.baomidou.springboot.xxx #logic-delete-configuration (the following 3 configurations) #logic-delete-value: 0 # logical-delete value (default is 1) #logic-not-delete-value: 1 # logical-not-delete value (default is 0) # Custom fill policy interface implementation #meta-object-handler: com.zhengqing.config. #custom SQL injector #sql-injector: com.baomidou.springboot.xxx configuration: #SQL parsing cache, multi-tenant @SqlParser annotation takes effect when enabled #sql-parser-cache: true configuration: # hump conversion Similar mapping from database column names to Java property hump naming map-underscore-to-camel-case: true # Whether to enable caching cache-enable: false # If the query contains a column with a null value, MyBatis will not map this field when mapping #call-setters-on-nulls: true # 打印sql log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
- Mybatis error under Springboot project: Invalid bound statement (not found)
- [Solved] Mybatis-plus Error: mybatisplus-Invalid bound statement (not found): com.integration.dao.ApiDao.getList
- Mybatis-plus calls its own method error: Invalid bound statement
- How to Solve org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) Error
- SpringBoot uses MyBatis error: Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseInsertProvider.dynamicSQL)
- Error: array bound is not an integer constant before ‘]’ token
- MyBatis: Mapped Statements collection does not contain value for xxx
- [Solved] Mybatis uses the PageHelper paging plugin error: Could not find method on interface ibatis.executor.Executor named query.
- [Solved] Mybatis Error: CannotFindDataSourceException: dynamic-datasource can not find primary datasource
- [Solved] Mybatis Error: Establishing SSL connection without server‘s identity verification is not recommended.
- ORA-24338 statement handle not executed [How to Solve]
- Hive Statement Error During Execution: Error while processing statement: FAILED: Execution Error, return code 2 from o
- Mybatis Error: Result Maps collection already contains value
- [Solved] Mybatis Error: Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration.
- [Solved] Mybatis Plus 3.X injection logic delete logicsqlinjector error
- [Solved] Mybatis Error: Resources.getResourceAsStream(resource) cannot find the method
- [Solved] Mybatis crud insert error: org.apache.ibatis.binding.BindingException: Mapper method ‘com.liang.dao.UserMapper.addUser…
- The loop of life and death occurs when the El table component of element UI is bidirectional bound
- [Solved] Error: Main class not found or could not be loaded com.jawasoft.
- mybatis-plus calls its own selectById method and reports an error: org.apache.ibatis.binding.BindingException: