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.
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;
- You can also jump directly from the arrow to the left of the Statement in the XML to the corresponding Mapper interface method.
- You can also go through
Alt+Enter
The key combination directly generates the XML implementation of the new method, which is easy to use!
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;
-
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:
- Just copy the log we want to convert and click
Restore Sql
Button.
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 right
RestServices
Button displays an overview of the interface in the project;
- You can search the corresponding interface according to the URL through the search button;
- Interface test requests can be made through the HTTP request tool at the bottom;
- Query parameters, request parameters, and request URL can be generated by right-clicking on the interface method.
- You can directly generate the JSON for the entity class by right-clicking on it.
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;
- Direct use of
Translation document
The entire document can be translated;
- You can also translate the specified content directly through the translate button in the upper right corner.
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 name
Generate
, and then selectGsonFormat
;
- Enter the JSON string we want to convert:
- Optionally change the property name and type:
- Click OK to generate the entity class directly.
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.
- If you need to change the color scheme, go through
Tools
Open the plug-in configuration menu;
- Then modify the color scheme through the configuration menu;
- It can be used by right-clicking on the console
Grep
Button to bring up the log analysis window:
- Then search by keyword directly.
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;
- When we violate the manual rules, the plug-in will automatically detect and prompt;
- At the same time, it provides the function of checking all code specifications and switching languages with one click.
- If you want to change the detection rules of a protocol, you can do so
Editor->Inspections
Modify.
Maven Helper
Maven is a great way to quickly find and resolve dependency conflicts in your projects.
- We can get through
pom.xml
Bottom of fileRely on the analysis of
TAB to view all dependencies in the current project;
- through
conflict
Button we can screen out all conflicting dependencies for the current projectguava
Dependency conflicts are currently being used18.0
Version;
- Select the conflicting dependencies and click
Exclude
The button can directly exclude this dependency;
- At the same time
pom.xml
The dependency will also be added to<exclusion>
Tag, is not very convenient ah!
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 menu
View->Tool Windows->Statistic
Button to enable the function;
- Now you can see the statistics of the code in our projects, such as my open source projects
mall
In thejava
Code size is2818kB
, the number of lines85645
.
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
.vue
File;
- When we write in the tag to
v-
Will prompt for the relevant instructions in Vue.
element
Elemental-ui support plugin that intelligently prompts for tags in Elemental-UI, eliminating the need to write code.
- When we write to
el-
The initial tag will prompt for the element-UI component.
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!!