当前位置:   article > 正文

SpringBoot项目的build.gradle配置介绍_springboot build.gradle配置全解

springboot build.gradle配置全解

Gradle 是用了一种基于 Groovy 的领域特定语言(DSL,Demain Specific Language)来声明项目设置,摒弃了 XML(如 ANT 和 Maven)的各种繁琐配置。

插入一个我的Eureka Service的项目结构图
在这里插入图片描述
构建脚本:build.gradle,需要注意的是,脚本内容的执行是有先后顺序的,一般来说按buildscript->plugins->repositories->dependencies->dependencyManagement,当然如果是其他的项目,比如java啦、C++啦,可能有其他的差别,本文以实用为宗旨,这里只介绍springboot项目

buildscript {
   
    repositories {
   
        maven {
    url 'https://maven.aliyun.com/nexus/content/groups/public' }
    }
    dependencies {
   
        classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.4.5'
    }
}

plugins {
   
    id 'org.springframework.boot' version '2.4.5'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/305635
推荐阅读
相关标签
  

闽ICP备14008679号