[Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.

Super detailed – springboot + mybatisplus can’t find a solution to mapper using XML
org.apache.ibatis.binding.bindingexception: invalid bound statement (not found): com.zyh.springboot.mapper.bowmapper.findlist
1. First, please look at my project directory, and my XML file is placed under mapper/XML

2, Add the following content in application.yml.
in fact, many students added mybatis plus at the beginning of the project, then add
mapper locations: classpath/COM/zyh/springboot/mapper/XML /. XML at the end.
note: there is no link between packages, such as com.zyh.springboot, which is incorrect
you can see that my mapper locations path is my XML path

#print sql code
mybatis-plus:
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
    map-underscore-to-camel-case: true  
  type-aliases-package: com.zyh.springboot.entity
  mapper-locations: classpath*:/com/zyh/springboot/mapper/xml/*.xml

3. Add an XML resource to pom.xml. This step is very important. If you don’t add it, you will always report an error.
regardless of the path, you just need to fill in * /. XML

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>
    </build>

4. Save the code, run the environment, and you can find the mapper


Read More: