Seeing the underlying SQL in the Spring JdbcTemplate?

后端 未结 7 1009
深忆病人
深忆病人 2020-11-30 02:24

I am learning about the wonders of JdbcTemplate and NamedParameterJdbcTemplate. I like what I see, but is there any easy way to see the underlying SQL that it ends up execut

7条回答
  •  渐次进展
    2020-11-30 02:38

    I use this line for Spring Boot applications:

    logging.level.org.springframework.jdbc.core = TRACE
    

    This approach pretty universal and I usually use it for any other classes inside my application.

提交回复
热议问题