1.下载地址
https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/
2.配置环境变量
Path=D:\spring-2.1.13.RELEASE\bin
3.验证
spring --version
4.新建groovy文件
@RestController
class WebAppliction {
@RequestMapping("/")
String home(){
return "Hello world!";
}
}
5. 运行程序
spring run hello.groovy ----server-port:9000
6.打包程序
spring jar hello.jar *.groovy --include resource/**,static/**,templates/** --exclude target/**,build/**
7.构建spring boot项目
spring init --denpendencies=web,data-redis knowledge-financial
spring init --list