posted 7 years ago
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.