I'm trying to run my spring container in a standalone application (it is from a spring mvc application).
So the context loads fine, but the problem is my services are autowired in my controllers.
How can I load this in my standalone application now?Code:@Autowired ProductService productService;
ProductService ps = (ProductService) context.getBean("productService");
I can the error:
Code:org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'productService' is defined.
Is the only way for this to work is to manually define it then?


Reply With Quote
