Class SitemapController

java.lang.Object
com.endurancetrio.app.common.web.SitemapController

@EnduranceTrioWebController public class SitemapController extends Object
The SitemapController serves the /sitemap.xml endpoint with every public URL in both language variants, annotated with hreflang alternates.

The XML is rendered from the templates/sitemap.xml template by a dedicated SpringTemplateEngine configured with an .xml suffix and XML template mode. The engine is created in the constructor rather than as a Spring bean so that the autoconfigured Thymeleaf engine (which uses the .html suffix for HTML views) is left untouched.

  • Constructor Details

  • Method Details

    • generateSitemap

      @GetMapping(value="/sitemap.xml", produces="application/xml") @ResponseBody public String generateSitemap()
      Returns the XML sitemap with all public URLs in both language variants.
      Returns:
      the rendered XML sitemap