public static TestServer createAndStartServer(Class<?>... configClasses) {
int port = NEXT_PORT.incrementAndGet();
Server server = new Server(port);
HashSessionIdManager idmanager = new HashSessionIdManager();
server.setSessionIdManager(idmanager);
AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext();
applicationContext.register(configClasses);
applicationContext.refresh();
try {
server.setHandler(getServletContextHandler(applicationContext));
server.start();
} catch (Exception e) {
LOGGER.error("Error starting server", e);
}
return new TestServer(server, applicationContext, port);
}
TestServerUtil.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:flowable-engine
作者:
评论列表
文章目录