인메모리로 실행시켰을 때 접속할 수 있도록 하는 빈
주소 : http://localhost:8080/console
1 2 3 4 5 6 |
@Bean fun h2ServletRegistration(): ServletRegistrationBean { val bean = ServletRegistrationBean(WebServlet()) bean.addUrlMappings("/console/*") return bean } |
그런데 in-memory 실행 시킬때는 콘솔접속 하지말고 그냥 stand alone 실행시켜서 접속하는게 낫지 않나
in-memory connection info
1 2 3 4 5 6 7 |
jdbc:h2:mem:{디비이름 암거나지정} url: jdbc:h2:mem:testdb driver-class-name: org.h2.Driver name: {name of data source} username: sa password: {empty} |