• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can spring make a class implement an interface?

 
Kurt Xu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In our project ,we need to intercept some concrete classes not implement any interfaces and we are not granted to refactor the code either cause it's developed by another department ,we can only use the common jar they offer. And another bad news is we can't easily add other opensource aop lib, like cglib, so the only intercepting way is to use jdk dynamic proxy, but it's no way to intercept classes without interface implement either. Is that possible to make a class implement a interface which includes all the method in the concrete class dynamically through spring ,then spring can intercept the class. I'm not sure if it's possible. The version is 2.0.6.
Many thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic