Spring JDBC - prevent logging - INFO: Added defaul

2019-06-24 08:40发布

My standalone application uses Spring JDBC.

I see a lot of the following statements in System.out

Mar 28, 2013 6:42:12 PM org.springframework.jdbc.core.JdbcTemplate extractReturnedResults
INFO: Added default SqlReturnUpdateCount parameter named #update-count-1

How do I prevent these logs?

1条回答
爷的心禁止访问
2楼-- · 2019-06-24 09:11

I got around this by skipping the undeclared results, which I don't need anyway

JdbcTemplate jt = new JdbcTemplate(dataSource);
jt.setSkipUndeclaredResults(true); 
查看更多
登录 后发表回答