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.
  • Constructor Details

  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.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 interface org.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 interface org.springframework.web.servlet.resource.ResourceResolver