Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mybatis的ServiceImpl对应方法如何查看执行SQL? #2983

Open
a372342061 opened this issue Jan 9, 2025 · 1 comment
Open

mybatis的ServiceImpl对应方法如何查看执行SQL? #2983

a372342061 opened this issue Jan 9, 2025 · 1 comment

Comments

@a372342061
Copy link

请问,我有一个Service继承了mybatis的ServiceImpl,在我通过 xxxservice.list(XX)方法执行时我如何才能查看到对应的执行的SQL?

@sheikmca
Copy link

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:




Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants