Hi,
i get
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'foo' is defined
when defining a Bean like this:
@Component("foo")
public class someDAO {...
and in XML:
<context:component-scan base-package="de.company" />
<context:annotation-config />
while if defining that way:
public class someDAO {...
XML:
<bean id="foo" class="de.company.path.persistence.access.someDAO" />
works.
Wicket Java is:
public class Index extends WebPage {
@SpringBean(name="foo")
private someDAO dao;
public Index() {
add(new Label("hw", "Hello World! - Im from Wicket!"));
System.out.println(dao.toString());
}
}
Did I do something wrong here or can it be that SpringBean doesnt work
with annotation configured spring beans?
Best,
Korbinian