我有一个带有 Embedded JETTY服务器的主JAVA项目 . 我需要使用这个嵌入式jetty服务器部署多个 Gradle Projects .
我正在寻找所有项目的 WAR LESS 部署 . 这个概念在LINK中有所描述 .
public static void main(String[] args) throws Exception
{
String webappDirLocation = "src/main/webapp/";
Server server = new Server(8080);
WebAppContext root = new WebAppContext();
root.setContextPath("/");
root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
root.setResourceBase(webappDirLocation);
root.setParentLoaderPriority(true);
server.setHandler(root);
server.start();
server.join();
}
但当我尝试 Gradle 项目时,它正在工作(我在Gradle项目中得到了很多 ClassNotFoundException (s)) .
我正在使用Spring Tool Suite IDE(eclipse) . 帮帮我们