-
1. Re: Arquillian Spring Autowire NULL
jonasventure Sep 10, 2015 7:10 PM (in response to jonasventure)I should add that all of my configuration is done with javaconfig:
public class AppInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext container) throws ServletException {WebApplicationContext context = getContext();
container.addListener(new ContextLoaderListener(context));
ServletRegistration.Dynamic dispatcher = container.addServlet("DispatcherServlet",
new DispatcherServlet(context));
dispatcher.setLoadOnStartup(1);
dispatcher.addMapping("/");
}
private AnnotationConfigWebApplicationContext getContext() {
AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
context.register(AppConfig.class, SpringMvcConfig.class);
return context;
}
}
-
2. Re: Arquillian Spring Autowire NULL
jonasventure Sep 10, 2015 8:10 PM (in response to jonasventure)Just to add even more:
@RunWith(Arquillian.class)
@ContextConfiguration(classes = {RESTClientConfig.class})
The ContextConfiguration is not setting up the ApplicationContext as it should. The autowired components are all null. Is this not supported while using arquillian in client mode?