[英]Multiple entry points in SeedStack application
When I try to launch my SeedStack application, I get the following error:当我尝试启动 SeedStack 应用程序时,出现以下错误:
org.seedstack.seed.SeedException: [CORE] Multiple seedstack launchers
Description
-----------
There are multiple SeedStack entry points in the classpath.
Fix
---
Exactly one class implementing 'org.seedstack.seed.spi.SeedLauncher' should be present in the classpath and registered in
META-INF/services. Remove all but one launcher.
What is the cause of this and how can I fix it ?这是什么原因,我该如何解决?
A SeedLauncher
is used to launch a particular kind of application (Web app, CLI app, ...). SeedLauncher
用于启动特定类型的应用程序(Web 应用程序、CLI 应用程序等)。 A SeedStack module can only be of one kind at a time.一个 SeedStack 模块一次只能是一种。 The error above occurs when you have multiple active implementation of the
SeedLauncher
interface in your classpath.当您的类路径中有多个
SeedLauncher
接口的活动实现时,就会发生上述错误。 By active I mean present and registered as a service in META-INF/service
.主动是指在
META-INF/service
存在并注册为META-INF/service
。
The most common cause is when you have the seed-web-undertow
and the seed-cli
dependencies in the classpath at the same time, as both provide their own implementation of SeedLauncher
.最常见的原因是当您在类路径中同时拥有
seed-web-undertow
和seed-cli
依赖项时,因为它们都提供了自己的SeedLauncher
实现。
You have to choose if your module should be a CLI application or a Web application and remove the useless dependency.您必须选择您的模块应该是 CLI 应用程序还是 Web 应用程序,并删除无用的依赖项。 If you want to build both kinds, you'll have to separate them in different modules.
如果您想构建这两种类型,则必须将它们分开在不同的模块中。
Some add-ons can also provide launcher which can interfere in the same way.一些附加组件还可以提供可以以相同方式干扰的启动器。 If the quick solution above doesn't resolve your problem, use your IDE to find all implementations of the
SeedLauncher
interface and re-organize your modules to have only one launcher per module.如果上述快速解决方案不能解决您的问题,请使用您的 IDE 查找
SeedLauncher
接口的所有实现并重新组织您的模块,使每个模块只有一个启动器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.