NamespaceManager.get()
会抛出什么原因NullPointerException
。
谁能帮我确定可能的原因NamespaceManager
是空的并且get()
会抛出 NPE?
这是我的 JUnit 测试代码:
@ContextConfiguration(locations = { "classpath:service/client-config.xml" })
@RunWith(SpringJUnit4ClassRunner.class)
public class MyDaoTest {
private final LocalServiceTestHelper helper =
new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig()
.setDefaultHighRepJobPolicyUnappliedJobPercentage(0));
@Before
public void setUp() {
helper.setUp();
}
@After
public void tearDown() {
helper.tearDown();
}
@Test
public void test() {
}
}
基本上,client-config.xml
配置有<mvc:annotation-driven />