First:
import org.springframework.web.bind.annotation.RestController;
Second:
You need to change @Controller to @RestController.