我正尝试使用spring mvc框架构建Web服务。我正在使用IntelliJ Community Edition IDE和gradle构建系统。无法使用Gradle添加IntelliJ Community Edition中的应用程序服务器
的build.gradle
buildscript {
ext {
kotlinVersion = '1.1.3-2'
springBootVersion = '1.5.6.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-jersey')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile 'org.springframework.boot:spring-boot-starter-tomcat'
}
应用构建成功。但是我找不到使用Gradle在Community Edition中添加应用程序服务器(Tomcat)的选项。
Welcome to Gradle 3.5.1.
To run a build, run gradle <task> ...
To see a list of available tasks, run gradle tasks
To see a list of command-line options, run gradle --help
To see more detail about a task, run gradle help --task <task>
BUILD SUCCESSFUL
Total time: 4.817 secs
Process finished with exit code 0
有谁知道如何在Gradle系统的IntelliJ Community Edition中添加tomcat应用服务器?
据我所知,此功能仅在终极版中可用。 –
@ C-Otto是的,终极版有内置选项,但应该有解决方法来添加它并完成此操作。 –
当然,只需支付功能:) –