Class BundleResourceResolver

java.lang.Object
org.springframework.web.servlet.resource.AbstractResourceResolver
org.broadleafcommerce.common.web.resource.resolver.BundleResourceResolver
All Implemented Interfaces:
org.springframework.core.Ordered, org.springframework.web.servlet.resource.ResourceResolver

@Component("blBundleResourceResolver") public class BundleResourceResolver extends org.springframework.web.servlet.resource.AbstractResourceResolver implements org.springframework.core.Ordered
A ResourceResolver that is used to serve previously bundled files.

It works with ResourceBundlingService which is able to create and read bundle files.

Since:
Broadleaf 4.0
Author:
Brian Polster
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    protected static final org.apache.commons.logging.Log
     

    Fields inherited from class org.springframework.web.servlet.resource.AbstractResourceResolver

    logger

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    protected boolean
    isBundleFile(String requestPath)
     
    protected void
    logTraceInformation(org.springframework.core.io.Resource bundle)
     
    protected org.springframework.core.io.Resource
    resolveResourceInternal(jakarta.servlet.http.HttpServletRequest request, String requestPath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)
     
    protected String
    resolveUrlPathInternal(String resourceUrlPath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)
     
    void
    setOrder(int order)
     

    Methods inherited from class org.springframework.web.servlet.resource.AbstractResourceResolver

    resolveResource, resolveUrlPath

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOG

      protected static final org.apache.commons.logging.Log LOG
    • bundlingService

      protected ResourceBundlingService bundlingService
  • Constructor Details

    • BundleResourceResolver

      public BundleResourceResolver()
  • Method Details

    • resolveResourceInternal

      protected org.springframework.core.io.Resource resolveResourceInternal(jakarta.servlet.http.HttpServletRequest request, String requestPath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)
      Specified by:
      resolveResourceInternal in class org.springframework.web.servlet.resource.AbstractResourceResolver
    • logTraceInformation

      protected void logTraceInformation(org.springframework.core.io.Resource bundle)
    • resolveUrlPathInternal

      protected String resolveUrlPathInternal(String resourceUrlPath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)
      Specified by:
      resolveUrlPathInternal in class org.springframework.web.servlet.resource.AbstractResourceResolver
    • isBundleFile

      protected boolean isBundleFile(String requestPath)
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • setOrder

      public void setOrder(int order)