ava.lang.IllegalArgumentException: [Assertion failed] - this expression must be true

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/VABTC/article/details/81415826

信息: Loading validation configurations from [file [G:\bpsms\bpsms\target\classes\resources\valid\custom_rules.xml],file [G:\bpsms\bpsms\target\classes\resources\valid\formValid.xml],file [G:\bpsms\bpsms\target\classes\resources\valid\validation.xml],file [G:\bpsms\bpsms\target\classes\resources\valid\validator-rules.xml]]

java.lang.IllegalArgumentException: [Assertion failed] - this expression must be true

at org.springframework.util.Assert.isTrue(Assert.java:65)
at org.springframework.util.Assert.isTrue(Assert.java:77)
at org.haze.bpsms.balance.MetalReturnInformationServiceTest.testSelectOne(MetalReturnInformationServiceTest.java:107)
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.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.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)

IDEA冲java开发,selectone中报错

解决办法:

查询的id必须要在数据库中存在

猜你喜欢

转载自blog.csdn.net/VABTC/article/details/81415826
今日推荐