Class ProxyConfig

java.lang.Object
com.bld.proxy.api.find.config.ProxyConfig

@Component public class ProxyConfig extends Object
Factory bean that creates Java dynamic proxy instances for ApiFindController interfaces.

ProxyConfig is a Spring component that wraps the JDK Proxy API. It is used by ApiFindRegistrar as a factory method (proxyConfig.newProxyInstance(interfaceClass)) when registering each controller interface as a bean in the application context.

All proxy calls are delegated to ApiFindInterceptor, which handles the actual query resolution and execution.

Author:
Francesco Baldi
See Also:
  • Constructor Details

    • ProxyConfig

      public ProxyConfig()
  • Method Details

    • newProxyInstance

      public <T> T newProxyInstance(Class<T> classT)
      Creates a new JDK dynamic proxy for the given interface, backed by ApiFindInterceptor.
      Type Parameters:
      T - the interface type
      Parameters:
      classT - the interface class to proxy; must not be null
      Returns:
      a proxy instance that implements classT