Simple and crude: SpringBoot + Mybatis console to view the execution of SQL Log

scenes to be used:

The development process using a large file MapperXML more complex logic to generate SQL, such as <forEach> and the like, can see the SQL statements and parameters actually performed by this method, to facilitate debugging. After the release of its on-line commented out as much as possible, because the configuration will print out all the results line by line.

 

The first step: yml configuration file to add the following to configure
    the mybatis:
      the Configuration:
        log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

 

Results are as follows:

Released four original articles · won praise 3 · Views 137

Guess you like

Origin blog.csdn.net/q2450751976/article/details/103945276
Recommended