如何将 IntelliJ 中的多个运行配置组合在一起? [英] How to combine several run configurations in IntelliJ together?
问题描述
我有一个包含多个模块的 IntelliJ 项目.一些模块应该作为服务器运行.对于每个服务器(模块),我都有一个运行配置.
我可以将这些运行配置捆绑在一起,这样我就不需要点击运行或停止五次吗?
如果重要的话,该项目已经完全成熟.
先前接受的答案不适用于运行多个服务器或任何不会终止的脚本.
好消息是,现在您可以使用 Compound
运行配置,该配置本机内置于程序中,以同时执行多个不会终止的服务器.
事实上,即使是 MultiRun 插件也在他们的
使其工作的步骤:
- 首先创建您的个人运行配置
- 然后创建一个新的复合配置
- 现在选择您之前设置的单个运行配置.
- 最后只需运行新的
Compound
配置即可.
所有单独的配置将同时运行.非常适合不退出的服务器和其他线程!
I have an IntelliJ project with several modules. Some of the modules should be run as servers. For every server (module), I have a run configuration.
Can I bundle those run configurations together, so I don't need to click run or stop five times?
If it matters, the project is fully mavenized.
The previously accepted answer does not work for running multiple servers or any scripts which do not terminate.
The good news is that now you can use the Compound
run configuration which is build natively into the program to execute multiple servers simultaneously which do not terminate.
In fact, even the MultiRun plugin states on their GitHub page that they recommend to use the Compound
run configuration over their plugin.
Official IntelliJ IDEA documentation
Here's what the options looks like:
Steps to get it working:
- First create your individual run configurations
- Then create a new compound configuration
- Now choose the individual run configurations you previously set up.
- Finally just run your new
Compound
configuration.
All the individual configs will run simultaneously. Perfect for servers and other threads which do not exit!
这篇关于如何将 IntelliJ 中的多个运行配置组合在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!