- 安装CLI
- https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/2.1.1.RELEASE/spring-boot-cli-2.1.1.RELEASE-bin.zip
- 解压后即可使用,免安装。解压位置 F: ooljavaspring-boot-cli-2.1.1.RELEASE-binspring-2.1.1.RELEASE
- 设置环境变量 PATH+=F: ooljavaspring-boot-cli-2.1.1.RELEASE-binspring-2.1.1.RELEASEin;
- 编制启动脚本
- F:spring-boot-projects est2app.groovy
-
@RestController class ThisWillActuallyRun { @RequestMapping("/") String home(){ "Hello World!" } }
- 运行
- spring run app.groovy
- 效果