啟動tomcat以後報Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample錯誤

來源:互聯網
上載者:User

標籤:put   ring   work   java   resources   tomcat   tom   roo   bst   

十月 01, 2017 2:56:38 下午 org.apache.coyote.AbstractProtocol start資訊: Starting ProtocolHandler ["http-bio-8080"]十月 01, 2017 2:56:44 下午 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.selectByExampleat 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.$Proxy27.selectByExample(Unknown Source)at com.taotao.service.impl.ItemServiceImpl.geTbItemById(ItemServiceImpl.java:33)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:267)at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

  

找不到mapper對應檔,開啟workspace工作空間以後,發現根本沒有xml檔案

解決辦法:

修改pom檔案,在其中加上如下代碼:

 

<!-- 如果不添加此節點mybatis的mapper.xml檔案都會被漏掉。 --><build><resources>            <resource>                <directory>src/main/java</directory>                <includes>                    <include>**/*.properties</include>                    <include>**/*.xml</include>                </includes>                <filtering>false</filtering>            </resource>        </resources>

啟動tomcat以後報Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample錯誤

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.