Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package com.example;
import org.h2.server.web.WebServlet;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ServiceConfiguration {
@Bean
ServletRegistrationBean h2servletRegistration(){
ServletRegistrationBean registrationBean = new ServletRegistrationBean( new WebServlet());
registrationBean.addUrlMappings("/console/*");
return registrationBean;
}
}
@aglassman

This comment has been minimized.

Copy link
Owner Author

@aglassman aglassman commented Feb 9, 2016

spring.datasource.url=jdbc:h2:file:/Users/aglassman/workspace/question-ninja/work/h2QuestionDb
spring.datasource.username=h2user
spring.datasource.password=h2user
spring.datasource.driver-class-name=org.h2.Driver

spring.jpa.hibernate.ddl-auto=update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.