Hi there,

I have a java progam using Maven, JPA, Eclipse, Jenkins. While developing I have the setting

spring:
jpa:
show-sql: true

in my application.yml file which works fine. Now, for a load test I have huge chunk of data. If I execute the test it works fine in Eclipse, but fails in Maven as the SureFire Plugin fails on such large console output. I can make it work by redirecting the console to a file, but that won't work for Jenkins and it won't work if I start the tests altogether because I want to see the result on the console obviously. So I would like to have this setting (show-sql) be switched off temporarily. I suppose it must live somewhere in the JPA / Hibernate configuration classes, but I couldn't find any combination yet that would allow me to change it.

The closest I suppose I came to it was by this:

entityManager.setProperty( "hibernate.show_sql", false );
entityManager.setProperty( "spring.jpa.hibernate.show_sql", false );
entityManager.setProperty( "javax.persistence.hibernate.show_sql", false );

Where the entityManager is autowired to the component. But when reading those properties, the return is some values from a completely different namespace (some timeout values), so I reckon I am in the wrong corner...

Any advise is appreciated,
Stephan