SoFunction
Updated on 2025-03-08

Code example of the idea to enable SQL log printing of mybatis console

Open

mybatis-plus:
  configuration:
    log-impl: 

mybatis:
  configuration:
    log-impl: 
    map-underscore-to-camel-case: true
  typeAliasesPackage: XXXX
  mapper-locations: classpath*:**/xml/*

-impl=

closure

mybatis-plus:
  configuration:
    log-impl: 

-impl=

StdOutImpl is just a log implementation of mybatis, and mybatis also has multiple log implementations.

How do you know which way to use it now?

When the project starts, the following prompt will be printed directly on the console:

Logging initialized using 'class ' adapter.

This is the article about the code example of the idea to enable SQL log printing on mybatis console. For more related ideas to enable SQL log printing, please search for my previous articles or continue browsing the following related articles. I hope everyone will support me in the future!