arthas
arthas copied to clipboard
mybatis的ServiceImpl对应方法如何查看执行SQL?
请问,我有一个Service继承了mybatis的ServiceImpl,在我通过 xxxservice.list(XX)方法执行时我如何才能查看到对应的执行的SQL?
If you use Spring Boot, you can enable SQL logging by adding it to the properties file.
logging.level.com.baomidou.mybatisplus=debug logging.level.org.apache.ibatis=debug
If you use Logback, configure logback.xml like this: