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

import click.kamil.examples.statemachine.extended.service.QuirkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SetterInjectionController {

    private QuirkService setterService;

    @Autowired
    public void setSetterService(@Qualifier("customName") QuirkService setterService) {
        this.setterService = setterService;
    }

    @GetMapping("/test-setter")
    public void testSetter() {
        setterService.doQuirk();
    }
}
