Tips - accgetter/SpringBoot GitHub Wiki

便利なMavenライブラリ

H2データベースClient

		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.4.185</version>
		</dependency>

そしてAppConfigに以下追記

// H2 Database Client
import org.h2.server.web.WebServlet;
import org.springframework.boot.context.embedded.ServletRegistrationBean;

    // H2 Database Client
    @Bean
    ServletRegistrationBean h2servletRegistration(){
        ServletRegistrationBean registrationBean = new ServletRegistrationBean( new WebServlet());
        registrationBean.addUrlMappings("/console/*");
        return registrationBean;
    }

http://localhost:8080/consoleでH2データベースClientが起動

⚠️ **GitHub.com Fallback** ⚠️