Class H2ConsoleConfig

java.lang.Object
ai.nervemind.app.config.H2ConsoleConfig

@Configuration public class H2ConsoleConfig extends Object
H2 Console configuration for Spring Boot 4.x.

In Spring Boot 4.x, the H2 console servlet needs to be explicitly registered as the automatic configuration may not work properly with the newer servlet API.

  • Constructor Details

    • H2ConsoleConfig

      public H2ConsoleConfig()
  • Method Details

    • h2ConsoleServlet

      @Bean public org.springframework.boot.web.servlet.ServletRegistrationBean<org.h2.server.web.JakartaWebServlet> h2ConsoleServlet()
      Registers the H2 console servlet.
      Returns:
      the servlet registration bean for H2 console