hello world
This commit is contained in:
parent
52782b603d
commit
7da8c7ee3c
@ -2,12 +2,19 @@ package ru.ulstu.is.lab1;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@SpringBootApplication
|
||||
@RestController
|
||||
public class Lab1 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Lab1.class, args);
|
||||
}
|
||||
|
||||
@GetMapping("/hello")
|
||||
public String hello(@RequestParam(value = "name", defaultValue = "World") String name) {
|
||||
return String.format("Hello %s!", name);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user