FilePersistence.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:red5-server 作者:
/**
 * Returns the context path.
 * 
 * @param rootFile
 * @return context path
 */
private String getContextPath(Resource rootFile) {
    String contextPath = null;
    if (rootFile instanceof ServletContextResource) {
        ServletContextResource servletResource = (ServletContextResource) rootFile;
        contextPath = servletResource.getServletContext().getContextPath();
        if ("/".equals(contextPath)) {
            contextPath = "/root";
        }
    } else if (resources instanceof IScope) {
        contextPath = ((IScope) resources).getContextPath();
        if (contextPath == null) {
            contextPath = "/root";
        }
    }
    log.debug("Persistence context path: {}", contextPath);
    return contextPath;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号