0
我在Hello World上運行測試,試圖在我的spring java程序中關注Jersey Framework。filenotfoundexception運行jerseyTest - 缺少applicationContext.xml
我已經擴展了JerseyTest,但是我得到了上面的錯誤。澤西給出的例子link似乎沒有幫助。
public class SimpleTest extends JerseyTest {
@Override
protected Application configure() {
return new ResourceConfig(RestService.class);
}
@Test
public void test() {
final String hello = target("\service\hello").request().get(HelloModel.class);
assertEquals("Hello World!", hello);
}
}
什麼會這樣的例子嗎? AnnotationConfigApplicationContext(YourSpringConfig.class)。我嘗試了應用程序和jerseyconfig,但他們沒有工作。 – user269964
不完全確定你的意思。 –
我去了2號的鏈接。我遵循了他們對所學課程的看法。我正在爲hello世界做.packages(com.service.rs)。我收到錯誤NoClassDefFound注入/ Binder – user269964