Trying to set up a project but fail at Autowiring objects through Spring.
package se.hsr.web;
public class TestRunner {
public static void main(String[
You need to retrieve the ContactDAO instance from Spring context. You are initing yourself with new
keyword.
See the below link;
@Autowired annotation not able to inject bean in JUnit class
or if not unit test
ClassPathResource resource = new ClassPathResource("beans.xml");
BeanFactory factory = new XmlBeanFactory(resource);
beanFactory.getBean("nameOfYourBean");
http://static.springsource.org/spring/docs/2.0.x/reference/beans.html