I think if you're using a single database, you don’t need to configure this manually—Spring Boot usually handles it automatically.
Here’s a video showing a similar configuration, though for a different purpose:
https://www.youtube.com/watch?v=fLyn8Ovyp8w
https://www.youtube.com/watch?v=utOyoLjBz-U
If you still want to configure it yourself, you can follow the steps there, or check any online blog. I suspect your session configuration might be incorrect.
@Configuration
public class AppConfig {
@Bean(name="entityManagerFactory")
public LocalSessionFactoryBean sessionFactory() {
LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
return sessionFactory;
}
}