Spring boot 官网学习笔记

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