Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 922 Bytes

quick-start.md

File metadata and controls

34 lines (26 loc) · 922 Bytes

快速开始

  • gradle.build.kts

    // 添加devops-boot gradle插件
    plugins {
        id("com.tencent.devops.boot") version ${version}
    }
    
    dependencies {
        // 添加需要的starter组件
        implementation("com.tencent.devops:devops-boot-starter-web")
    }
  • 编写启动类TestApplication.kt

      @RestController
      @SpringBootApplication
      class TestApplication {
      
          @GetMapping
          fun greeting(): String = "Hello, Devops-Boot!"
      }
      
      fun main(args: Array<String>) {
          runApplication<TestApplication>(args)
      }
  • 启动,Enjoy it!

?> 如上,我们只添加了devops-boot-gradle插件,就能进行SringBoot甚至SpringCloud应用的开发了,无需额外操作,自动为我们配置好jdk版本、编译选项、依赖管理、kotlin依赖及kotlin-spring插件等繁琐的配置项。