0 Replies Latest reply on Jan 14, 2016 9:01 AM by mgalala

    @Cache supports inherited interfaces

    mgalala

      Hello,

      we are implementing our rest endpoints on Java interfaces not on the classes, and to keep these interfaces good structured and follow object oriented, then we structured these interfaces with inheritance.

      For example Interface "Base" is the parent interface of "InterfaceA" and "InterfaceB", while "InterfaceA" is parent of "InterfaceFoo" and "InterfaceMoo". The rest annotation is located only on the bottom interfaces "InterfaceFoo" and "InterfaceMoo".

      I have tried to set @Cache annotation on any of the parent interfaces but it didn't work. The only case that let @Cache works when setting it on "InterfaceFoo" itself or any get method inside not Base nor InterfaeA nor any other interface.

      I am importing RestEasy 3.0.10 in my project and when i debugged the code i found  that org.jboss.resteasy.plugins.interceptors.CacheControlFeature:configure gets the declaring resource class/interface only and doesn't scan if any parent component has the annotation.

       

      Is there any other solution that i might implement to get it done? or is this a new feature?

       

       

      Regards,

      Mohamed