-
Apr 8th, 2010, 10:57 AM
#1
@Configurable usage during compile time weaving
Hello everyone,
I am new to AspectJ with Spring and I am reading the chapter of http://static.springsource.org/sprin...-using-aspectj ---> 6.8.1. Using AspectJ to dependency inject domain objects with Spring
So far as I understand, I need to enable in my application_Context.xml the use of this annotation. So in my application_context.xml I define
<context:component-scan base-package="com.idc.cms" />
<context:spring-configured />
I have placed @Configurable in my class where I am accessing
@Resource
MyjdbcRepository myjdbcRepository;
In MyjdbcRepository, I am using jdbcTemplate and access some of the sql queries.
The problem: When I write my test, I try to access my @Configurable class and test the method which is using myjdbcRepository.getMyData(value); But I get NullPointerException.
It seems that MyjdbcRepository class is not injecting properly. Can someone please explain / help me to find some solution for this?
Thanks in advance,
Regards,
Meenakshi
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules