package com.iit.springboot;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    // http://localhost:8080/
	@GetMapping("/")
	public String index() {
		return "Greetings from Spring Boot!";
	}

    // http://localhost:8080/login/
    @GetMapping("/login")
	public String login() {
		return "Login from Spring Boot!";
	}

    // http://localhost:8080/login/26
    @GetMapping("/login/{id}")
    public String read(@PathVariable(name = "id") String id) {
        return "Param: " + id;
    }
}