Close

Spring Framework - @Named Examples

Spring Framework 

public class OrderServiceClient {

@Inject
@Named("OrderServiceB")
private OrderService orderService;

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




See Also