Git Product home page Git Product logo

intellij-mybaitslog's Introduction

Mybatislog Mybatislog

GitHub release (latest by date) GitHub GitHub issues

Mybatislog能做什么?

Mybatislog是基于IntelliJ 开发的项目,用来格式化输出Mybatis的Sql。

样列

样列

★★重大更新★★

版本从V3.*开始支持所有数据库的SQL都能均能正常格式化输出
版本从V3.*开始必须需要配合Mybatis插件使用否则就无效。
版本从V3.*插件只支持IDEA版本2020.3以上
版本从V3.*插件只支持SpringBoot版本2以上或SpringCloud
版本从V3.*插件只支持Mybatis版本3.5.0以上

第一步:

<dependency>
    <groupId>com.github.link-kou</groupId>
    <artifactId>mybatis-plugin</artifactId>
    <version>1.0.2</version>
</dependency>

第二步:
SpringBoot配置示例:

SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
sqlSessionFactoryBean.setPlugins(new LogInterceptor());
return sqlSessionFactoryBean.getObject();

Sponsors

JetBrains

2022.08.16 -> 《IDEA 2022.2 测试通过支持使用。》★★★重大更新,从版本V3开始将彻底解决字符串替代弊端,支持所有数据库★★★

2021.06.12 -> 《IDEA 2021.3 测试通过支持使用。》

2020.08.11 -> 《IDEA 2020.2 测试通过支持使用。》

2020.08.25 -> 重构代码所有代码,代码中完善备注信息

2020.09.19 -> 添加对特点类型的引号支持

2020.10.07 -> 支持2020.2.3版本

2020.11.20 -> 改进分隔判断,由单纯通过,判断会存在无法对文本正常分隔的情况下。

2020.12.18 -> 改进Like判断异常(解决还不够优雅,不影响正常使用)。

2020.12.19 -> 添加可选是否格式化。

2021.01.18 -> 支持IDEA:2020.3.1,Master代码升级到IDEA2020.3.1版本(JAVA_11版本)

2021.01.31 -> 发布2.0包。不向下兼容IDEA:2020.3以下版本,拥抱Java11,代码将保持兼容度,如果需要2020.3以下包支持,自行编译以下。

2021.02.11 -> 发布2.0.1包。修复兼容性问题,不兼容还是会有不少后遗症。

2021.06.15 -> 发布2.0.5包。修复无法自定义关键字问题。

2021.09.16 -> 发布2.0.6包。增加自动生成字面量按钮。

2021.12.15 -> 支持IDEA 2020.3 发布2.0.7包。修复无法自定义关键字问题。

--  1  2020.04.10 23:30:19 CST DEBUG com.cms.dao.ProductTypeConfigTitleDao.queryAll - ==>
select f_id, f_name, f_preId, f_type, createtime, updatedtime
FROM cms.t_product_type_config_title
WHERE f_type = 2;
------------------------------------------------------------------------------------------------------------------------
--  2  2020.04.10 23:30:20 CST DEBUG com.cms.dao.ProductTypeConfigGroupDao.queryAll - ==>
select f_id, f_titleId, f_name, f_preId, f_type, createtime, updatedtime
FROM cms.t_product_type_config_group
WHERE f_type = 2;
------------------------------------------------------------------------------------------------------------------------
--  3  2020.04.10 23:30:20 CST DEBUG com.cms.dao.ProductTypeConfigItemDao.queryAll - ==>
select f_id, f_groupId, f_preId, f_name, f_type, createtime, updatedtime
FROM cms.t_product_type_config_item
WHERE f_type = 2;
------------------------------------------------------------------------------------------------------------------------

使用环境

IntelliJ IDEA Ultimate版(172+)

源代码构建

项目管理:Gradle

在线安装(搜索)

不提供在线插件库安装

手动安装

2020.3 以上版本都支持

plugin.intellij.assistant.mybaitslog-2020.3.X-3.0.0.zip

说明文档:
1、插件基于日志来进行打印,如果无法打印SQL语句。排查一下日志
2、插件默认随项目启动而启动
3、如果不行!试试看!无敌大法,卸载插件,然后在重新安装

intellij-mybaitslog's People

Contributors

link-kou avatar baymaxxjf avatar stkai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.