@Configuration public class InterfaceProxyConfig {
@Bean public OrderControllerV1 orderController(LogTrace logTrace){ OrderControllerV1Impl controllerImpl = new OrderControllerV1Impl(orderService(logTrace)); return new OrderControllerInterfaceProxy(controllerImpl, logTrace); }
@Bean public OrderServiceV1 orderService(LogTrace logTrace){ OrderServiceV1Impl orderServiceImpl = new OrderServiceV1Impl(orderRepository(logTrace)); return new OrderServiceInterfaceProxy(orderServiceImpl, logTrace); }
@Bean public OrderRepositoryV1 orderRepository(LogTrace logTrace){ OrderRepositoryV1 orderRepositoryImpl = new OrderRepositoryV1Impl(); return new OrderRepositoryInterfaceProxy(orderRepositoryImpl, logTrace); } }
|