spring data jpa - How to get the JPA generated SQL query? - Stack Overflow
Create a bean like this.
@Bean public JpaVendorAdapter jpaVendorAdapter(){ HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter(); jpaVendorAdapter.setGenerateDdl(true); jpaVendorAdapter.setShowSql(true); return jpaVendorAdapter; }
If you're using Spring Boot add it somewhere to your @Configuration.
Read full article from spring data jpa - How to get the JPA generated SQL query? - Stack Overflow
No comments:
Post a Comment