This is an example of Java Dynamic Proxy to get you started with this feature. To understand how it works read the following article,
- JDK 11 or above
- Maven
Execute,
$ mvn clean package && java -jar target/sample-java-dynamic-proxy-1.0-SNAPSHOT-jar-with-dependencies.jar
The implementation of the dynamic proxy can be found under in /proxy/MethodexecutorLogger.java
.
And demonstration on how to use it is in Application.java
.