简体   繁体   English

如何从命令行运行springmvc + gradle项目?

[英]How to run a springmvc+gradle project from command line?

In my springmvc project, I use gradle as a build tool. 在我的springmvc项目中,我使用gradle作为构建工具。

But our FE developers always complain about that why they have to start the project in IntelliJ IDEA, but they don't use the IDE as their editor at all. 但是我们的FE开发人员总是抱怨为什么必须在IntelliJ IDEA中启动项目,却根本不使用IDE作为其编辑器。

so, recently I made a lot of research on running my project from command line. 因此,最近我对从命令行运行项目进行了大量研究。

Please help. 请帮忙。

If gradle is used and all is configured well, try gradle run while using the application plugin. 如果使用gradle并且所有配置都正确,请在使用应用程序插件时尝试gradle运行。

You do need to load the plugin 您确实需要加载插件

apply plugin: 'application'

and define the main class of your application 并定义您的应用程序的主类

mainClassName = "org.gradle.sample.Main"

Further parameters can be defined as well. 也可以定义其他参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM