Reputation: 216
I am using spring boot application with hibernate to connect to postgressql, but when I am running my application with run as spring boot app the starting of server is stuck with loading hibernate files without any error, I am stuck on this and it's not also showing any error. Does anyone have any idea?
Upvotes: 1
Views: 2916
Reputation: 145
If you are using JPA, check your repository configuration. Spring can spend a very long time scanning for JPA repositories if you don't have basePackages
or basePackageClasses
set in your @EnableJpaRepositories
annotation (this can be added by JpaRepositoriesAutoConfiguration if your setup meets that class's @ConditionalOn
requirements).
Upvotes: 0
Reputation: 216
There was another instance of Postgresql server was running and i was also not able to kiss the process that's why the application was stuck, i restarted my system and its working fine
Upvotes: 0
Reputation: 1573
Add the following to your app properties
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
or in your code the below
properties.setProperty("hibernate.temp.use_jdbc_metadata_defaults", "false");
Hope it helps!
Upvotes: 2