views:

23

answers:

1

I have a cglib proxied class because the impl uses both the @Repository @Transactional annotations.

I would like to use spring's reflection utils to set the field value for mocking out one of the fields.

But when reflection utils can not find the field in my class.

How can i get this to work? So then i can mock out the field (collaborator).

A: 

CGLIB extends your class and adds the transactional logic in the extended class. Have you tried to use protected fields instead of private?

Espen
Awesome! It worked.
JavaRocky