Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法在带有Gradle的IntelliJ社区版中添加应用程序服务器_Java_Spring_Tomcat_Intellij Idea_Gradle - Fatal编程技术网

Java 无法在带有Gradle的IntelliJ社区版中添加应用程序服务器

Java 无法在带有Gradle的IntelliJ社区版中添加应用程序服务器,java,spring,tomcat,intellij-idea,gradle,Java,Spring,Tomcat,Intellij Idea,Gradle,我正在尝试使用SpringMVC框架构建web服务。我正在使用IntelliJ社区版IDE和gradle构建系统 格雷德尔先生 buildscript { ext { kotlinVersion = '1.1.3-2' springBootVersion = '1.5.6.RELEASE' } repositories { mavenCentral() } dependencies { cla

我正在尝试使用SpringMVC框架构建web服务。我正在使用IntelliJ社区版IDE和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社区版中添加应用服务器(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 3.5.1。
要运行构建,请运行gradle。。。
要查看可用任务的列表,请运行gradle tasks
要查看命令行选项列表,请运行gradle--help
要查看有关任务的更多详细信息,请运行gradle help--task
建设成功
总时间:4.817秒
进程已完成,退出代码为0
有人知道如何在带有Gradle系统的IntelliJ社区版中添加tomcat应用程序服务器吗


据我所知,社区版中没有这本书。 仅限终极版

请参考此链接:


据我所知,社区版中没有这本书。 仅限终极版

请参考此链接:

您可以使用此插件在社区版中添加带有
Gradle
的tomcat

在buildscript依赖项中添加此插件

buildscript {
    repositories {
        mavenCentral()
        jcenter()
    }
    dependencies {
        .....
        classpath 'com.bmuschko:gradle-tomcat-plugin:2.3'
    }
}
应用此插件
Apply插件:“com.bmuschko.tomcat”

现在需要将tomcat运行库添加到tomcat配置中。我有这个可能对你有用

repositories {
    mavenCentral()
}

dependencies {
    ....
    def tomcatVersion = '8.0.42'
    tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
            "org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
            "org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
}
希望这对您有所帮助。

您可以使用此插件在社区版中添加带有
Gradle
的tomcat

在buildscript依赖项中添加此插件

buildscript {
    repositories {
        mavenCentral()
        jcenter()
    }
    dependencies {
        .....
        classpath 'com.bmuschko:gradle-tomcat-plugin:2.3'
    }
}
应用此插件
Apply插件:“com.bmuschko.tomcat”

现在需要将tomcat运行库添加到tomcat配置中。我有这个可能对你有用

repositories {
    mavenCentral()
}

dependencies {
    ....
    def tomcatVersion = '8.0.42'
    tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
            "org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
            "org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
}

希望这对您有所帮助。

据我所知,此功能仅在Ultimate Edition中可用。@C-Otto是的,Ultimate Edition中有内置选项,但应该有办法添加它并完成此操作。当然,只需为该功能付费:)maven有变通办法,但gradleAs没有。据我所知,该功能仅在Ultimate Edition中可用。@C-Otto是的,Ultimate Edition中有内置选项,但应该有变通办法来添加它并完成此操作。当然,只需为该功能付费:)maven有解决方案,但gradleNope找不到。你可以这样做,希望我的回答能帮助你!不。你可以这样做,希望我的回答能帮助你!