hi,
 I have a base interface for my service.
 public interface BaseInterface<T> {
    public  List<T> find(T parent);
    public  List<T> findAll();
 }
//------------- ServiceA
 public interface ServiceAInterface extends BaseInterface<Member> {
   @Cacheable(clazz=Member.class,cacheKey="xxx")
    public  List<Member> find(Member parent);
   @Cacheable(clazz=Member.class,cacheKey="xxxxx")
    public  List<Member> findAll();

 }
public class ServiceA implements ServiceAInterface{
 ..................
}


I use an advice to enhance the service;

If I call service.findAll(),I find the advice works fine.But if I call
service.find(parent),The advice never be called.
I debug the AspectInterceptorBuilderImpl class,I find

69   remainingMethods.addAll(Arrays.asList(serviceInterface.getMethods()));

serviceInteface.getMethods() that incluedes three method:

List findAll()
List find(com.xxx.Distirct)
List find(java.lang.Object) .

The method List findAll() and List find(com.xxx.Distirct) was enhanced.When
I call service.find(district),It will call List find(java.lang.Object)
method, the advice doesn't works.


But I think If serviceInterface.getMethods() returns  two method:

List findAll()
List find(com.xxx.Distirct).

All works fine;


JDK bug or T5 bug?give me some advice.thanks.



-- 
regards,
Jun Tsai

Reply via email to