PortletContextResourcePatternResolver.java 文件源码

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

项目:spring4-understanding 作者:
/**
 * Overridden version which checks for PortletContextResource
 * and uses {@code PortletContext.getResourcePaths} to find
 * matching resources below the web application root directory.
 * In case of other resources, delegates to the superclass version.
 * @see #doRetrieveMatchingPortletContextResources
 * @see PortletContextResource
 * @see javax.portlet.PortletContext#getResourcePaths
 */
@Override
protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException {
    if (rootDirResource instanceof PortletContextResource) {
        PortletContextResource pcResource = (PortletContextResource) rootDirResource;
        PortletContext pc = pcResource.getPortletContext();
        String fullPattern = pcResource.getPath() + subPattern;
        Set<Resource> result = new HashSet<Resource>();
        doRetrieveMatchingPortletContextResources(pc, fullPattern, pcResource.getPath(), result);
        return result;
    }
    return super.doFindPathMatchingFileResources(rootDirResource, subPattern);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号