Browse Source

Merge pull request #12802 in DESIGN/design from release/11.0 to bugfix/11.0

* commit '5706da81addd9a78d6cd8bf02cfbcf8bdae17f5d':
  REPORT-105614 设计器去除webroot/druid服务
bugfix/11.0
superman 1 year ago
parent
commit
665cf72a4f
  1. 5
      designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

5
designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

@ -15,7 +15,6 @@ import com.fr.web.socketio.WebSocketEndpoint;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import org.apache.catalina.Context; import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleException;
import org.apache.catalina.Wrapper;
import org.apache.catalina.loader.WebappLoader; import org.apache.catalina.loader.WebappLoader;
import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.Tomcat;
import org.apache.catalina.webresources.StandardRoot; import org.apache.catalina.webresources.StandardRoot;
@ -81,10 +80,6 @@ public class FineEmbedServerActivator extends Activator {
String contextPath = "/" + ProductConstants.getAppFolderName(); String contextPath = "/" + ProductConstants.getAppFolderName();
final Context context = tomcat.addContext(contextPath, docBase); final Context context = tomcat.addContext(contextPath, docBase);
context.setResources(new StandardRoot(context)); context.setResources(new StandardRoot(context));
Wrapper servlet = Tomcat.addServlet(context, "DruidStatView", "com.fr.third.alibaba.druid.support.http.StatViewServlet");
context.addServletMappingDecoded("/druid/*", "DruidStatView");
servlet.setLoadOnStartup(1);
servlet.setOverridable(true);
Tomcat.initWebappDefaults(context); Tomcat.initWebappDefaults(context);
//覆盖tomcat的WebAppClassLoader //覆盖tomcat的WebAppClassLoader
context.setLoader(new FRTomcatLoader()); context.setLoader(new FRTomcatLoader());

Loading…
Cancel
Save