{"id":925,"date":"2023-03-11T17:22:15","date_gmt":"2023-03-11T09:22:15","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=925"},"modified":"2023-04-29T15:46:56","modified_gmt":"2023-04-29T07:46:56","slug":"mybatis-print-sql-in-spring-boot","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/11\/mybatis-print-sql-in-spring-boot\/","title":{"rendered":"Spring Boot\u4e2dMyBatis\u6253\u5370sql"},"content":{"rendered":"<p>\u5982\u679c\u4f7f\u7528\u7684\u662f<code>application.properties<\/code>\u6587\u4ef6\uff0c\u52a0\u5165\u5982\u4e0b\u914d\u7f6e\uff1a<\/p>\n<pre><code>logging.level.cn.appblog.demo=debug<\/code><\/pre>\n<p><!-- more --><\/p>\n<p><code>logging.level.*<\/code>\u540e\u9762\u7684\u8def\u5f84\u6307\u7684\u662fMybatis\u5bf9\u5e94\u7684\u65b9\u6cd5\u63a5\u53e3\u6240\u5728\u7684\u5305\uff0c\u5e76\u4e0d\u662f<code>mapper.xml<\/code>\u6240\u5728\u7684\u5305\u3002<\/p>\n<p>\u5982\u679c\u4f7f\u7528\u7684\u662f<code>application.yml<\/code>\u6587\u4ef6\uff0c\u52a0\u5165\u5982\u4e0b\u914d\u7f6e\uff1a<\/p>\n<pre><code class=\"language-yml\"># \u6253\u5370sql\nlogging:\n  level:\n    cn.appblog.demo: debug<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u4f7f\u7528\u7684\u662fapplication.properties\u6587\u4ef6\uff0c\u52a0\u5165\u5982\u4e0b\u914d\u7f6e\uff1a logging.level.cn [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[111],"class_list":["post-925","post","type-post","status-publish","format-standard","hentry","category-mybatis","tag-mybatis"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=925"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/925\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}