在spring mybatis 时遇见,排查后为mapper里xml文件没有写<mapper/>没有namespace
Error parsing Mapper XML. Cause: java.lang.NullPointerException
java.lang.ExceptionInInitializerError
at com.ssm.test.MybatisAssociatedTest.findStudentByIdTest(MybatisAssociatedTest.java:12)
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:601)
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(FrameworkM