SpringBoot CLI可以快速开发spring应用程序
- 下载
https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/2.3.4.RELEASE/spring-boot-cli-2.3.4.RELEASE-bin.zip - 安装
解压,添加系统环境变量
和添加java系统环境变量一样 - 创建hello.groovy
@RestController
class ThisWillActuallyRun{
@RequestMapping("/")
String home() {
“hello world”;
}
} - 命令行启动
spring run hello.groovy
- 运行成功后查看