Maven和Mybaties结合,Maven不处理java文件夹下面的配置文件

HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.shop.mapper.TbItemMapper.selectByExample


//遇到这个错误的原因是因为Maven和Mybaties结合,Maven只会处理resource文件夹下面的配置文件而不会处理java这个文件夹下面的配置文件。所以遇到这个问题需要加相应的配置

<build>

         <resources>

            <resource>

                <directory>src/main/java</directory>

                <includes>

                    <include>**/*.properties</include>

                    <include>**/*.xml</include>

                </includes>

                <filtering>false</filtering>

            </resource>

        </resources>

</build>

你可能感兴趣的:(Maven和Mybaties结合,Maven不处理java文件夹下面的配置文件)