Class CortexWebAutoConfiguration

java.lang.Object
ai.chatur.cortex.spring.web.CortexWebAutoConfiguration

@AutoConfiguration(after=CortexAutoConfiguration.class) @ConditionalOnProperty(prefix="cortex.web", name="enabled", matchIfMissing=true) @ConditionalOnWebApplication(type=SERVLET) @ConditionalOnClass(org.springframework.stereotype.Controller.class) public class CortexWebAutoConfiguration extends Object
Web UI auto-configuration for Cortex: the Thymeleaf controllers that browse the graph, review and edit pending branches, export the approved assertions, and stage an uploaded document for review.

Runs after CortexAutoConfiguration, so every controller here can depend on the role interfaces the core beans satisfy.

Active only when all of the following hold, so a consumer wanting the graph without the UI gets there with one property rather than by excluding individual controller beans:

  • cortex.web.enabled is not set to false (defaults to enabled)
  • the application is a servlet web application
  • Spring MVC's @Controller is on the classpath

Each controller is also @ConditionalOnMissingBean, so a consumer may substitute their own by declaring a bean of the same type.

  • Constructor Details

    • CortexWebAutoConfiguration

      public CortexWebAutoConfiguration()
      Creates the auto-configuration. Spring instantiates this; consumers do not.