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:
Note that the key is mapper-locations and not mapper-locations:
#primary-key-type 0: "Database ID self-incrementing", 1: "User input ID", 2: "Global unique ID (numeric unique ID)", 3: "Global unique ID UUID";
#field-strategy 0: "Ignore judgment",1: "Non-NULL judgment"),2: "Non-Null judgment"
#refresh-mapper debugging artifact
#database capital-underline conversion
#sequence interface implementation class configuration
#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
#custom SQL injector
#sql-injector: com.baomidou.springboot.xxx configuration:
#SQL parsing cache, multi-tenant @SqlParser annotation takes effect when enabled
# hump conversion Similar mapping from database column names to Java property hump naming
# Whether to enable caching
# If the query contains a column with a null value, MyBatis will not map this field when mapping