1、 Mybatisplus only configures mapper in YML, and the path scanning is not enough
mapper-locations: classpath:com/jack/shale_porosity/mapper/xml/*.xml
In this way, only the basemapper provided by mybatis can be used. The mapper file is not loaded in the target file.
2、 Configure the mapper file scanning path again in the pom.xml file
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
In this way, you can successfully use custom SQL and SQL in basemapper.
Read More:
- How to Fix Invalid bound statement (not found) Error
- [Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.
- Spring boot can’t scan XML (invalid bound statement (not found))
- solve org.apache.ibatis . binding.BindingException : invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.dao.UserDao
- In the SQL query statement, add the column that does not exist in the table and set the fixed value of the column
- DB2 create table error – 104 42601 illegal symbol encountered in SQL statement
- error: a label can only be part of a statement and a declaration is not a statement (How to Fix)
- Arduino reports an error when writing a custom library file to solve the problem of not name of type, not declared in this scope
- DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=;;,?,?,?,?,?,?,?,?);END-OF-STATEMENT
- “Invalid month” in SQL query
- Error: unclassifiable statement in FORTRAN do statement
- SQL Error (3621): String or binary data would be truncated The statement has been terminated. */
- error: declaration may not appear after executable statement in block
- Namespace ‘app’ is not bound
- Cause: java.sql.SQLException: invalid column type: 1111 Error [How to Fix]
- Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the
- Ora-01008: not all variables are bound
- Prompt “namespace ‘app’ not bound” when compiling Android studio
- ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS sqlState