org.apache.catalina.Server.getCatalinaBase()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.apache.catalina.Server.getCatalinaBase()方法的一些代码示例,展示了Server.getCatalinaBase()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.getCatalinaBase()方法的具体详情如下:
包路径:org.apache.catalina.Server
类名称:Server
方法名:getCatalinaBase

Server.getCatalinaBase介绍

[英]Obtain the configured base (instance) directory. Note that home and base may be the same (and are by default). If this is not set the value returned by #getCatalinaHome() will be used.
[中]获取已配置的基本(实例)目录。请注意,home和base可能是相同的(默认情况下是相同的)。如果未设置此值,将使用#getCatalinaHome()返回的值。

代码示例

代码示例来源:origin: line/armeria

static String toString(org.apache.catalina.Server server) {
  requireNonNull(server, "server");
  final Service[] services = server.findServices();
  final String serviceName;
  if (services.length == 0) {
    serviceName = "<unknown>";
  } else {
    serviceName = services[0].getName();
  }
  final StringBuilder buf = new StringBuilder(128);
  buf.append("(serviceName: ");
  buf.append(serviceName);
  if (TomcatVersion.major() >= 8) {
    buf.append(", catalinaBase: ");
    buf.append(server.getCatalinaBase());
  }
  buf.append(')');
  return buf.toString();
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

@Override
public File getCatalinaBase() {
  if (service != null) {
    Server s = service.getServer();
    if (s != null) {
      File base = s.getCatalinaBase();
      if (base != null) {
        return base;
      }
    }
  }
  // Fall-back
  return super.getCatalinaBase();
}

代码示例来源:origin: codefollower/Tomcat-Research

@Override
public File getCatalinaBase() {
  if (service != null) {
    Server s = service.getServer();
    if (s != null) {
      File base = s.getCatalinaBase();
      if (base != null) {
        return base;
      }
    }
  }
  // Fall-back
  return super.getCatalinaBase();
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

@Override
public File getCatalinaBase() {
  if (service != null) {
    Server s = service.getServer();
    if (s != null) {
      File base = s.getCatalinaBase();
      if (base != null) {
        return base;
      }
    }
  }
  // Fall-back
  return super.getCatalinaBase();
}

相关文章