package click.kamil.examples.statemachine.extended.web;

import click.kamil.examples.statemachine.extended.service.AmbiguousService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ListInjectionController {

    private final List<AmbiguousService> services;

    public ListInjectionController(List<AmbiguousService> services) {
        this.services = services;
    }

    @GetMapping("/test-list")
    public void testList() {
        for (AmbiguousService s : services) {
            s.doAmbig();
        }
    }
}
