Class BLCJSUrlPathResolver
java.lang.Object
org.springframework.web.servlet.resource.AbstractResourceResolver
org.broadleafcommerce.common.web.resource.resolver.BLCJSUrlPathResolver
- All Implemented Interfaces:
org.springframework.core.Ordered
,org.springframework.web.servlet.resource.ResourceResolver
@Component("blBLCJSUrlPathResolver")
public class BLCJSUrlPathResolver
extends org.springframework.web.servlet.resource.AbstractResourceResolver
implements org.springframework.core.Ordered
A
ResourceResolver
that replaces the //BLC-SERVLET-CONTEXT and //BLC-SITE-BASEURL"
tokens before serving the BLC.js file.
This component modifies the path and works in conjunction with the BLCJSResourceResolver
which loads the modified file.
The processes were split to allow for caching of the resource but not the URL path.
- Since:
- 4.0, Broadleaf 4.0
- Author:
- Reggie Cole, Brian Polster
-
Field Summary
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected String
addVersion
(String requestPath, String version) int
getOrder()
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
-
Field Details
-
LOG
protected static final org.apache.commons.logging.Log LOG
-
-
Constructor Details
-
BLCJSUrlPathResolver
public BLCJSUrlPathResolver()
-
-
Method Details
-
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 classorg.springframework.web.servlet.resource.AbstractResourceResolver
-
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 classorg.springframework.web.servlet.resource.AbstractResourceResolver
-
addVersion
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order)
-