I have a basic SpringBoot app., embedded Tomcat, Thymeleaf template engine. I've created this bean to access the console:
@Bean
public ServletRegistrationBean h2ConsoleServletRegistration() {
ServletRegistrationBean bean = new ServletRegistrationBean(new WebServlet());
bean.addUrlMappings("/console/*");
return bean;
}
I access to the console: http://localhost:8080/appContext/console/login.do?jsessionid=f3585792a9bf1f0cf1a0b6a09dcefe1a
I have my beans annotated as follows:
@Entity
@Table(name="t_user")
public class User implements Serializable, UserDetails {
..
}
My application properties:
# Spring Data JPA properties
spring.datasource.url=jdbc:h2:mem:testdb;MODE=MySQL;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
hibernate.dialect=org.hibernate.dialect.H2Dialect
But I don't see any table created by JPA:
