Spring Boot Cli入门

1、test.groovy

@RestController
class testApp{
    @RequestMapping("/")
    String home() {
        "It works!"
    }
}

2、运行

bin/spring run test.groovy

3、这样,一个spring boot的网站已经开启了哦

Leave a Reply

Your email address will not be published. Required fields are marked *

*