I am doing @DataJpaTest on default spring boot settings. When I run the test, hibernate(?) is flooding console with schema creation messages like:
Hibernate: alter table ...
Hibernate: alter table ...
Hibernate: alter table ...
Hibernate: alter table ...
Hibernate: call next value ...
And so on. Does anyone knows how to disable this messages? I have logback configuration for test with log level OFF on root logger.
/Annonymous
答案 0 :(得分:4)
@DataJpaTest
默认显示SQL输出。
* If SQL output should be logged.
* @return if SQL is logged
*/
@PropertyMapping("spring.jpa.show-sql")
boolean showSql() default true;
您可以在注释@DataJpaTest(showSql=false)