我在调用时收到以下错误server.start()
:
ClassNotFoundException: org.glassfish.tyrus.container.grizzly.server.GrizzlyServerContainer
我也找不到GrizzlyServerContainer
的 maven 依赖项.
有什么想法吗?这是我的代码:
private WebSocketModulManager() {
server = new Server("127.0.0.1", 30000, "/lightconsole", null, LightconsoleEndpoint.class);
try {
server.start();
} catch (DeploymentException e) {
e.printStackTrace();
} finally {
server.stop();
}
}
Maven Dependecies
试试这个依赖关系:
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-grizzly-server</artifactId>
<version>1.13</version>
</dependency>