Please forgive if i use terminology wrong, but i'm new to java-web development and Spring. Correct my assumptions, if i'm wrong.
I want to create a WebApp, that uses Vaadin for UI and Spring MVC for RESTful Web-Services. So, i think, I need 2 Servlets. One for serving Vaadin and one for serving Spring MVC.
I have some generic dao-beans, which are used by both servlets, so i thought, that i could use Spring, with @Autowired annotation to inject those @Repository and @Component - tagged beans into the MVC and the Vaadin-"(App|Servlet)". (Discovered through springs component-scan - feature)
But i can't get it working. The Spring-MVC-App - works. I've annotated all @Controllers and all things are @Autowired automaticly.
But in Vaadin i always get:
SCHWERWIEGEND: Servlet.service() for servlet [hello] in context with path [/pliste] threw exception [javax.servlet.ServletException: failed to acquire new instance of class net.d21.pliste.HelloWorld] with root cause
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [net.d21.pliste.HelloWorld] is defined: expected single bean but found 0:
I think my basic question is, how to inject general dependencies into 2 different servlets? (In my case it's Vaadin and MVC, but i think it's replaceable).