A dynamic proxy is an object generated at runtime that implements one or more interfaces. Every method call on the proxy is intercepted by an InvocationHandler, which can add behaviour before/after delegating to the real object — or skip delegation entirely. Spring AOP, JPA lazy loading, and mocking frameworks (Mockito) are built on dynamic proxies.
How Proxy.newProxyInstance works