spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.16k stars 37.96k forks source link

Invoke default methods in dynamic proxies automatically #28495

Open sbrannen opened 2 years ago

sbrannen commented 2 years ago

Overview

See #28491 for background information.

In JDK dynamic proxies created by Spring AOP, we could potentially introduce support for automatically invoking default methods (or make it easier via a utility).

Available Java APIs

injae-kim commented 8 months ago

In JDK dynamic proxies created by Spring AOP, we could potentially introduce support for automatically invoking default methods (or make it easier via a utility).

We can add some class to support automatically invoking default method, but I found that only 2 proxies (HttpServiceProxyFactory, RSocketServiceProxyFactory) invoke default method now 😄

So I think introducing some utility to invoke default method is enough for now! We can easily improve it later.

I created simple PR https://github.com/spring-projects/spring-framework/pull/32018 🙇 If my PR is not what you think, please close it or share your idea~! thank you!