I am tyring to inject an object using aop, this is what i have, i know i am missing something, please help
object
xml set upCode:@Configurable("user") public class UserObject { private TestClassI testBean; public TestClassI getTestBean() { return testBean; } public void setTestBean(TestClassI testBean) { this.testBean = testBean; } }
Code:<aop:spring-configured/> <bean id="testBean" scope="session" class="test.TestClass"> <aop:scoped-proxy/> </bean> <bean id="user" class="test.domain.UserObject" scope="prototype"> <property name="testBean" ref="testBean"/> </bean>
i added the spring-aspect.jar
what else do i need to do.
oh yeah, so now i call this from a inex.jsp
Code:UserObject user = new UserObject(); TestClassI testclassi = user.getTestBean(); testclassi.printThis();
i get a null point exception when trying to access the testclass
thanks for the help


Reply With Quote
