Mybatis BindingException: Invalid bound statement (not found): com.xx.xxx problem solved

Problem Description:

BindingException: Invalid bound statement (not found): com.xx.xxx when the service layer of the SSM framework calls the Dao layer method

Possible causes:

1. The path of the xxxDao class package name corresponding to the namespace of the xxxMapper.xml file is inconsistent

2. The xxxMapper.xml file is not scanned

SpringBoot solution:

Add the following code in the build tag of the pom.xml file

<resources>
    <resource>
        <directory>src/main/java</directory>
        <includes>
            <include>**/*.properties</include>
            <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
    </resource>
</resources>

 

Published 34 original articles · Like1 · Visits 1945

Guess you like

Origin blog.csdn.net/qq_38974638/article/details/105371874