In a Spring application we have several warnings like this:
o.s.aop.framework.CglibAopProxy - Unable to proxy interface-implementing method [...]
because it is marked as final:
Consider using interface-based JDK proxies instead!
This question and its answers describe well the whole issue:
Using CGLIB has a limitation that methods marked as final in target class can’t be advised as final methods can’t be overridden (CGLIB creates a subclass of target class at runtime) but this limitation disappears in case of using JDK dynamic proxies.
There are situations where you simply need to use it, such as here.
The solutions I found say more or less Don't worry, it is only a warning, you may decrease the log level if you don't like to see it.
My question is more specific: Is it possible to suppress the warning for a specific class only? We do not want to suppress all the warnings, just the ones where we know that what we are doing is on purpose.
Version:
- Spring Boot Starter: 2.0.0.M3
- Spring: 5.0.0.RC3