Class FrontControllerResolver
java.lang.Object
org.tailormap.api.configuration.base.FrontControllerResolver
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,org.springframework.web.servlet.resource.ResourceResolver
@Component
public class FrontControllerResolver
extends Object
implements org.springframework.web.servlet.resource.ResourceResolver, org.springframework.beans.factory.InitializingBean
Resolver which returns index.html for requests to paths created by the Angular routing module.
When the user refreshes the page such routes are requested from the server.
When the user refreshes the page such routes are requested from the server.
-
Constructor Summary
ConstructorDescriptionFrontControllerResolver
(ConfigurationRepository configurationRepository, ApplicationRepository applicationRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoid
org.springframework.core.io.Resource
resolveResource
(jakarta.servlet.http.HttpServletRequest request, String requestPath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain) resolveUrlPath
(String resourcePath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)
-
Constructor Details
-
FrontControllerResolver
public FrontControllerResolver(@Lazy ConfigurationRepository configurationRepository, @Lazy ApplicationRepository applicationRepository)
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
resolveResource
public org.springframework.core.io.Resource resolveResource(jakarta.servlet.http.HttpServletRequest request, @NonNull String requestPath, @NonNull List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain) - Specified by:
resolveResource
in interfaceorg.springframework.web.servlet.resource.ResourceResolver
-
resolveUrlPath
public String resolveUrlPath(@NonNull String resourcePath, @NonNull List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain) - Specified by:
resolveUrlPath
in interfaceorg.springframework.web.servlet.resource.ResourceResolver
-