【发布时间】:2020-02-28 03:26:50
【问题描述】:
据我所知,gradle 在设置依赖项时需要版本号,但允许使用部分通配符。例如,如果我想要番石榴,我不能这样做,因为它失败了:
compile('com.google.guava:guava')
必须是(例如):
compile('com.google.guava:guava:21.0')
但是,我正在学习 Spring,它具有以下内容:
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework:spring-web")
compile("com.fasterxml.jackson.core:jackson-databind")
在没有提供版本的情况下,这些依赖项如何工作?
是不是因为以下原因,但我认为这些行仅对我的插件“org.springframework.boot”是必需的:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.3.RELEASE")
}
}
【问题讨论】:
标签: gradle