Abstract

Summary of the usual work of 12 commonly used IDEA plug-ins, back-end and front-end have been attached to my use skills, after reading the development efficiency of great!

Lombok

Lombok provides a very interesting addition to Java projects, using annotations to effectively resolve tedious and repetitive code such as setters, getters, toString, equals, hashCode, and non-null judges.

  • For example, we add @getter and @setter annotations to a class:

    / * *

    • Modify order cost information parameters
    • Created by macro on 2018/10/29.

    */ @Getter @Setter public class OmsMoneyInfoParam { private Long orderId; private BigDecimal freightAmount; private BigDecimal discountAmount; private Integer status; } Duplicate code

  • Lombok automatically generates getters and setters for all properties for us.

! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae364051d3~tplv-t2oaga2asx-image.image )

Free MyBatis Plugin

MyBatis extension allows you to jump freely between Mapper interface methods and XML implementations, and can also be used to generate some XML implementations with one click.

  • We can jump directly to the corresponding XML implementation by using the arrow to the left of the method in the Mapper interface;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae37480d2c~tplv-t2oaga2asx-image.image )
  • You can also jump directly from the arrow to the left of the Statement in the XML to the corresponding Mapper interface method.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae3752333f~tplv-t2oaga2asx-image.image )
  • You can also go throughAlt+EnterThe key combination directly generates the XML implementation of the new method, which is easy to use!
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae38105eb5~tplv-t2oaga2asx-image.image )

MyBatis Log Plugin

Sometimes we need to run the process generated SQL statements to help us troubleshoot some problems, this plug-in can restore Mybatis output SQL log into a complete SQL statement, we do not need to manually convert.

  • First we need to open the plugin window;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae3956eed2~tplv-t2oaga2asx-image.image )
  • When we call the method, the console output Mybatis SQL log;

    The 2020-04-28 15:52:20. 13960-455 the DEBUG [nio – 8081 – exec – 1] C.M.M.M.U msAdminMapper. SelectByExample: = = > Preparing: select id, username, password, icon, email, nick_name, note, create_time, login_time, status from ums_admin WHERE ( username = ? ) The 2020-04-28 15:52:20. 13960-456 the DEBUG [nio – 8081 – exec – 1] C.M.M.M.U msAdminMapper. SelectByExample: = = > the Parameters: The admin (String) the 2020-04-28 15:52:20. 13960-463 the DEBUG [nio – 8081 – exec – 1] C.M.M.M.U msAdminMapper. SelectByExample: <== Total: 1 Copies the code

  • The plug-in will automatically convert us into the corresponding SQL statement;

    1 the 15:50:40 2020-04-28. 9512-487 the DEBUG [nio – 8081 – exec – 9] C.M.M.M.U msAdminMapper. SelectByExample: ==> select id, username, password, icon, email, nick_name, note, create_time, login_time, status FROM ums_admin WHERE ( username = ‘admin’ ); Copy the code

  • If you need to convert logs that are not in your console, you can use the SQL Text function of the plugin:

! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae3a697f21~tplv-t2oaga2asx-image.image )
  • Just copy the log we want to convert and clickRestore SqlButton.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae646446ef~tplv-t2oaga2asx-image.image )

RestfulToolkit

A set of Restful service development assistance tools set, provides the project interface overview information, according to the URL jump to the corresponding interface method, built-in HTTP request tool, request method to do some enhanced functions, in short, very powerful function!

  • You can go through the top rightRestServicesButton displays an overview of the interface in the project;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae625c7169~tplv-t2oaga2asx-image.image )
  • You can search the corresponding interface according to the URL through the search button;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae6a4e4d88~tplv-t2oaga2asx-image.image )
  • Interface test requests can be made through the HTTP request tool at the bottom;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae6b2244d2~tplv-t2oaga2asx-image.image )
  • Query parameters, request parameters, and request URL can be generated by right-clicking on the interface method.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae6f43b2f8~tplv-t2oaga2asx-image.image )
  • You can directly generate the JSON for the entity class by right-clicking on it.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae754c9d7e~tplv-t2oaga2asx-image.image )

Translation

A translation plug-in, support Google, Youdao, Baidu translation, when we look at the source code to see notes very helpful!

  • Directly select the content to be translated, right click to find the translation button;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae8773b262~tplv-t2oaga2asx-image.image )
  • Direct use ofTranslation documentThe entire document can be translated;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae88a301d1~tplv-t2oaga2asx-image.image )
  • You can also translate the specified content directly through the translate button in the upper right corner.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae9675f7f6~tplv-t2oaga2asx-image.image )

GsonFormat

This plugin converts JSON-formatted strings into entity classes, which is handy when creating entity classes based on JSON strings.

  • First we need to create an entity class, then right-click on the class nameGenerate, and then selectGsonFormat;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eae997a872f~tplv-t2oaga2asx-image.image )
  • Enter the JSON string we want to convert:
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaea03e4151~tplv-t2oaga2asx-image.image )
  • Optionally change the property name and type:
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaeaf6a3301~tplv-t2oaga2asx-image.image )
  • Click OK to generate the entity class directly.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaebe23f2d6~tplv-t2oaga2asx-image.image )

Grep Console

A plugin to help you analyze console logs, highlighting different levels of logs in different colors, and searching log content by keyword.

  • When the project prints logs, logs of different log levels are displayed in different colors.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaeb1115ddd~tplv-t2oaga2asx-image.image )
  • If you need to change the color scheme, go throughToolsOpen the plug-in configuration menu;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaec20847bd~tplv-t2oaga2asx-image.image )
  • Then modify the color scheme through the configuration menu;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaec42af774~tplv-t2oaga2asx-image.image )
  • It can be used by right-clicking on the consoleGrepButton to bring up the log analysis window:
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaec6bd4c36~tplv-t2oaga2asx-image.image )
  • Then search by keyword directly.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaed56b6d35~tplv-t2oaga2asx-image.image )

Alibaba Java Coding Guidelines

Alibaba “Java development manual” supporting plug-ins, you can real-time detection code does not conform to the manual regulations, help you code out of efficiency, code out of quality.

  • Let’s say there’s one in the manual;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaee42f8edd~tplv-t2oaga2asx-image.image )
  • When we violate the manual rules, the plug-in will automatically detect and prompt;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaeeafdf8a2~tplv-t2oaga2asx-image.image )
  • At the same time, it provides the function of checking all code specifications and switching languages with one click.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaef2e2886a~tplv-t2oaga2asx-image.image )
  • If you want to change the detection rules of a protocol, you can do soEditor->InspectionsModify.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaef368f329~tplv-t2oaga2asx-image.image )

Maven Helper

Maven is a great way to quickly find and resolve dependency conflicts in your projects.

  • We can get throughpom.xmlBottom of fileRely on the analysis ofTAB to view all dependencies in the current project;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaf004f2cfd~tplv-t2oaga2asx-image.image )
  • throughconflictButton we can screen out all conflicting dependencies for the current projectguavaDependency conflicts are currently being used18.0Version;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaf0054df0f~tplv-t2oaga2asx-image.image )
  • Select the conflicting dependencies and clickExcludeThe button can directly exclude this dependency;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaf053688d7~tplv-t2oaga2asx-image.image )
  • At the same timepom.xmlThe dependency will also be added to<exclusion>Tag, is not very convenient ah!
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaf09f59014~tplv-t2oaga2asx-image.image )

Statistic

A code statistics tool that can be used to count the number and size of lines of code in the current project.

  • We can go through the top menuView->Tool Windows->StatisticButton to enable the function;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaf1b8d29c5~tplv-t2oaga2asx-image.image )
  • Now you can see the statistics of the code in our projects, such as my open source projectsmallIn thejavaCode size is2818kB, the number of lines85645.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaf220bf1d7~tplv-t2oaga2asx-image.image )

Vue.js

Vue. Js support plug-in, wrote front-end friends must have used, can be created according to the template. Vue file, can also be Vue related code for intelligent tips.

  • After the plug-in is enabled, you can create a template based on the template.vueFile;
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaf2acde920~tplv-t2oaga2asx-image.image )
  • When we write in the tag tov-Will prompt for the relevant instructions in Vue.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaf28ff9fce~tplv-t2oaga2asx-image.image )

element

Elemental-ui support plugin that intelligently prompts for tags in Elemental-UI, eliminating the need to write code.

  • When we write toel-The initial tag will prompt for the element-UI component.
! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/5/12/17208eaf2d1a7a1d~tplv-t2oaga2asx-image.image )
Article source: https://juejin.cn/post/6844904158382964744#heading-12Copy the code

The public,

Concern public number: code farmers meeting the first time to obtain learning materials

Reply [computer] get 4 reply this PDF data access Java 】 【 the Java core knowledge to sort out the interview reply for Redis 】 【 the Redis video course “reply to obtain the RabbitMQ 】 【” via the RabbitMQ video course” Mybatis = Mybatis = Mybatis = Mybatis = Mybatis = Mybatis = Mybatis = Mybatis = Mybatis = Mybatis = Mybatis

Learning materials, long-term updates…

Java has a long way to go, keep learning and growing together!!