zoukankan      html  css  js  c++  java
  • springboot+mybatis 配置sql打印日志

    第一种:

    配置类型

    # 配置slq打印日志
    logging.level.com.lawt.repository.mapper=debug
    重点:

     #其中   com.lawt.repository.mapper    为MyBatis接口interface包的路径

    打印出来:

    如果只需要打印

    第二种:

    java代码类型

     /**
         * 打印 sql
         */
        @Bean
        public PerformanceInterceptor performanceInterceptor() {
            PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor();
            //格式化sql语句
            Properties properties = new Properties();
            properties.setProperty("format", "false");
            performanceInterceptor.setProperties(properties);
            return performanceInterceptor;
        }

    打印:

  • 相关阅读:
    css定位
    css盒子
    css元素分类
    Css属性
    Css基础2
    啊啊啊啊
    函数指针
    重载函数
    成员函数
    资源网站
  • 原文地址:https://www.cnblogs.com/mark5/p/11882736.html
Copyright © 2011-2022 走看看