Hi

I'm new to annotaion based spring, so this might be a silly question, so please forgive me

I've got a vaadin portlet for liferay. The main class is IpinApplication. In IpinApplication is a MyBeanInterface property which I would like to autowire. Below are the code and application context file. I've tried various different context files, but I just can't get my myBeanInterface to be autowired to IpinApplication, although the myBeanInterface bean does get created (I debugged to establish this). No errors are getting logged to my appservers log files. Any help will be much appreciated.

IpinApplication.java:
package za.co.itemate.ipin;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.beans.factory.annotation.Qualifier;
 
import za.co.itemate.ipin.interfaces.MyBeanInterface;
 
import com.vaadin.Application;
import com.vaadin.ui.*;
 
@Configurable(preConstruction = true)
public class IpinApplication extends Application {	
 
	private static final long serialVersionUID = 1L;
 
    private MyBeanInterface myBeanInterface;
 
	@Override
	public void init() {
		Window mainWindow = new Window("Ipin Application");
		Label label = new Label("Hello Vaadin user: " + myBeanInterface);
		mainWindow.addComponent(label);
		setMainWindow(mainWindow);	}
 
	public MyBeanInterface getMyBeanInterface() {
		return myBeanInterface;
	}
 
	@Autowired	
	public void setMyBeanInterface(@Qualifier("myBeanInterface") MyBeanInterface myBeanInterface) {
		this.myBeanInterface = myBeanInterface;
	}
}

MyBeanInterface.java:
package za.co.itemate.ipin.interfaces;
 
public interface MyBeanInterface {
 
	public String getName();
 
}

Please help?

MyBeanInterfaceImpl.java:
package za.co.itemate.ipin;
 
import za.co.itemate.ipin.interfaces.MyBeanInterface;
 
public class MyBeanInterfaceImpl implements MyBeanInterface {
 
	public MyBeanInterfaceImpl() {
		System.out.println("Test");
	}
 
	public String getName() {
		return "MyBeanInterfaceImpl";
	}
 
}

applicationContext.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	[url]http://www.springframework.org/schema/beans/spring-beans-3.1.xsd[/url]
	[url=http://www.springframework.org/schema/context]Index of /schema/context[/url]
	http://www.springframework.org/schema/context/spring-context-3.1.xsd">
 
	<!-- Turn on AspectJ @Configurable support -->
	<context:spring-configured />
	<context:annotation-config />
 
	<context:component-scan base-package="za.co.itemate.ipin" />
 
	<!-- >Turn on @Autowired, @PostConstruct etc support -->
	<bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor" />
	<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />
 
	<bean id="myBeanInterface" class="za.co.itemate.ipin.MyBeanInterfaceImpl"/>
 
</beans>

I've also tried to define IpinApplication as a bean, but this did not help either:
...
 
             <bean id="mainApp" class="za.co.itemate.ipin.IpinApplication">
		<property name="myBeanInterface" ref="myBeanInterface" />
	</bean>	
...
...
            <bean id="mainApp" class="za.co.itemate.ipin.IpinApplication"/>
...

web.xml snippet:
...
	<context-param>
    	<param-name>contextConfigLocation</param-name>
    	<param-value>classpath*:applicationContext.xml</param-value>
  	</context-param>
...
	<listener>
    	<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  	</listener>
...