Reproduced Invalid bound statement (not found): Com.taotao.mapper.TbItemMapper.selectByExample: Error

Source: Internet
Author: User

Because of encountering the same problem, the use of this method for my effective, for the convenience of later search, so do a reprint, the original text please check:https://www.cnblogs.com/fifiyong/p/5795365.html

Under MAVEN engineering, you want to query the data in the database by the controller to receive the parameter ID in the URL, and display it in JSON form on the page.

Problems that occur after the browser enters a URL:

八月 22, 2016 1:45:22 下午 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for servlet [taotao-manager] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample] with root causeorg.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:189) at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:43) at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51) at com.sun.proxy.$Proxy30.selectByExample(Unknown Source)

Cause: The mapping file for mapper could not be found

 

Workaround:

 <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 --> <build>  <resources>            <resource>                <directory>src/main/java</directory>                <includes>                    <include>**/*.properties</include>                    <include>**/*.xml</include>                </includes>                <filtering>false</filtering>            </resource>        </resources></build>

The contents of the above node are added in the Pom.xml file in the parent project under the MAVEN project

Sorry, I can only according to the circumstances of their appearance, I hope to help the same mistakes of friends, but also hope to pass the cattle people pointing.

Reproduced Invalid bound statement (not found): Com.taotao.mapper.TbItemMapper.selectByExample: Error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.