为了账号安全,请及时绑定邮箱和手机立即绑定

为什么报java.lang.NullPointerException

java.lang.NullPointerException

at com.imooc.spring.ioc.Class003Test.test(Class003Test.java:24)

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:59)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)

at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:305)

at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)

at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:365)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)

at org.junit.runners.ParentRunner$4.run(ParentRunner.java:330)

at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:78)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:328)

at org.junit.runners.ParentRunner.access$100(ParentRunner.java:65)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:292)

at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:305)

at org.junit.runners.ParentRunner.run(ParentRunner.java:412)

at org.junit.runner.JUnitCore.run(JUnitCore.java:137)

at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)

at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)

at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)

at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)


正在回答

1 回答

把代码贴上来,或者你自己打断点看

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

为什么报java.lang.NullPointerException

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信