Close

Spring Framework - @Resource Examples

Spring Framework 

public class OrderServiceClient {

@Resource(name = "OrderServiceA")
private OrderService orderService;

public void showPendingOrderDetails() {
for (String orderId : Arrays.asList("100", "200", "300")) {
System.out.println(orderService.getOrderDetails(orderId));
}
}
}
Original Post




See Also