你好,请问我使用mybatis-plus 用spring测试的时候报错,错误如下

aklakl 发布于 2017/02/24 14:15
阅读 674
收藏 0

13:30:03.092 [main] DEBUG org.apache.ibatis.io.DefaultVFS - Not a JAR: file:/D:/OpenSource/Idea2016-worspace/innovate/innovate.service/target/classes/com/lzy/innovate/entity
13:30:03.142 [main] DEBUG org.apache.ibatis.io.DefaultVFS - Reader entry: Test.class
13:30:03.143 [main] DEBUG org.apache.ibatis.io.DefaultVFS - Listing file:/D:/OpenSource/Idea2016-worspace/innovate/innovate.service/target/classes/com/lzy/innovate/entity
13:30:03.143 [main] DEBUG org.apache.ibatis.io.DefaultVFS - Find JAR URL: file:/D:/OpenSource/Idea2016-worspace/innovate/innovate.service/target/classes/com/lzy/innovate/entity/Test.class
13:30:03.143 [main] DEBUG org.apache.ibatis.io.DefaultVFS - Not a JAR: file:/D:/OpenSource/Idea2016-worspace/innovate/innovate.service/target/classes/com/lzy/innovate/entity/Test.class
13:30:03.143 [main] DEBUG org.apache.ibatis.io.DefaultVFS - Reader entry: ����   3 ;
13:30:03.143 [main] DEBUG org.apache.ibatis.io.ResolverUtil - Checking to see if class com.lzy.innovate.entity.Test matches criteria [is assignable to Object]
13:30:03.144 [main] DEBUG o.m.spring.SqlSessionFactoryBean - Scanned package: 'com.lzy.innovate.entity' for aliases
13:30:03.224 [main] DEBUG o.m.spring.SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis-config.xml]'
13:30:03.249 [main] DEBUG o.m.spring.SqlSessionFactoryBean - Parsed mapper file: 'file [D:\OpenSource\Idea2016-worspace\innovate\innovate.service\target\classes\com\lzy\innovate\mapper\xml\TestMapper.xml]'
13:30:03.400 [main] INFO  innovate_service - logger input
13:30:03.401 [main] INFO  innovate_service - com.lzy.innovate.service.impl.TestServiceImpl@64dc00af

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.lzy.innovate.mapper.TestMapper.insert

    at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:223)
    at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
    at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
    at com.sun.proxy.$Proxy19.insert(Unknown Source)
    at com.baomidou.framework.service.impl.ServiceImpl.insert(ServiceImpl.java:55)
    at test.service.ServiceTest.test(ServiceTest.java:31)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
    at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)


Process finished with exit code -1

 

 

加载中
返回顶部
顶部