Today, I would like to introduce some cool plug-ins of IDEA. IDEA’s powerful plug-in library can not only bring us some convenient development, but also reflect our uniqueness.

1. Install plug-ins

Open the setting file and select the Plugins option

  • Ctrl + Alt + S
  • File -> Setting

Install JetBrains plugin, third party plugin, locally downloaded plugin package. See the previous Settings article for more details.

2. Plugins

Activate-power-mode and Power Mode II

Migrate to IDEA according to the effect of Atom’s plugin activate-power-mode

Write code to make the whole screen shake, activate-power-Mode is white, power Mode II color is cooler.

#2.Background Image Plus

Idea background modification plug-in, let your IDEA out of the ordinary, you can set your favorite picture as the code background.

After the installation is successful and restart, click the VIew TAB on the menu bar and click Set Background Image(this TAB is not available if the plug-in is not installed). In the pop-up box, select the local Image and click OK.

#3.Grep console

Custom log colors. Idea console can display various levels of logs in color. After installation, right-click the console to open the log.

You can also set the display styles for different log levels.

You can search by keyword directly, the search terms are regular expression support. Official website address.

#4.Free Mybatis plugin

Mybatis plugin lets you edit mybatis.xml like Java code. When we use Mybatis in development, we need to find the SQL statement in the corresponding XML through mapper interface. This plug-in is convenient for our operation.

After the installation is complete and IDEA is restarted, we will see a green arrow to the left of code or an extra column. Clicking on the arrow will direct us to the location of the corresponding XML file.

mapper

xml

#5.MyBatis Log Plugin

Mybatis is now the first choice for database manipulation in Java. During development, Mybatis scripts will be directly exported to the console, but by default, the output script is not a direct executable.

If we want to execute it directly, we need to convert it manually.

MyBatis Log Plugin this plug-in is to directly display the SQL script executed by MyBatis, without processing, can be directly copied out of the execution, as shown in the figure:

After executing the program, we can clearly see which SQL scripts we have executed, and the scripts can be executed and run.

#6.String Manipulation

Powerful string conversion tool. Use the shortcut key Alt+ M.

  • Hyphen-lowercase, hyphen-uppercase, snake_case, SCREAMING_SNAKE_CASE, dot. Case, words lowercase, Words Capitalized, PascalCase)
  • Convert to SCREAMING_SNAKE_CASE (or convert to camelCase)
  • Convert to snake_case (or convert to camelCase)
  • Convert to dot.case (or convert to camelCase)
  • Convert to hyphen-case (or convert to camelCase)
  • Convert to hyphen-case (or convert to snake_case)
  • Convert to camelCase (or convert to Words)
  • Convert to camelCase (or lowercase Words)
  • Convert to PascalCase (or convert to camelCase)
  • Select uppercase text
  • Style inversion

#7.Alibaba Java Coding Guidelines

Alibaba code specification check plug-in, of course, the specification can refer to the “Alibaba Java development manual”.

#8.Lombok

Java language, every time to write entity class need to write a lot of setter, getter, if the bean property once modified, deleted or added, need to generate or delete get/set and other methods, to increase the burden of code maintenance, which is also a reason Java is criticized. Lombok solves these problems for us by using Lombok annotations (@setter, @getter, @toString, @@Requiredargsconstructor, @equalSandhashCode or @data) There is no need to write or generate methods such as GET /set, which greatly reduces the amount of code and reduces the burden of code maintenance.

After installing Lombok, don’t forget to add maven as an example when using Lombok:

<dependency> 
 <groupId>org.projectlombok</groupId> 
 <artifactId>lombok</artifactId> 
</dependency>


@Setter
@Getter
@ToString
@EqualsAndHashCode
public class People {
 private String name;
 private int age;
 private String male;
}
Copy the code

#9.Key promoter

Key Promoter is the shortcut prompt plug-in of IntelliJ IDEA. It counts the number of times you click on a function and prompts you what shortcut keys you should use. It helps you remember the shortcut keys and you can close the plug-in when you are familiar with it.

#10.Gsonformat

Java entity classes can be quickly generated from JSON data.

Create a custom javaBean(no content, just an empty class), copy the Json you want to parse, then use Alt+ INSERT to pop up the following interface or use the shortcut Alt+S to paste the Json you just copied, and click OK.

#11.Restfultookit

In the development of Spring MVC web page, we used requestMapping to define the URL of the page. In order to find the URL, we usually used CMD + Shift +F to search for it. Our URL is named requestMapping + method requestMapping, lookup is still a little bit of a little bit of a convenience, restfulTooKit can be very convenient to help find.

For example: I want to find the controller corresponding to /user/add, so just Ctrl+ slash,

We can go directly to the controller we want. This is also really convenient, of course, restfultooKit also provides us with other features. Our controller generates default test data for us, and calls tests directly. This will solve the problem of assembling data every time we postman debug data, which is much clearer and much easier than looking for packets in console. (Photo from Internet)

#12.JRebel

JRebel is a hot-deployed productivity tool where code changes take effect without restarting the program. It skips the rebuild, restart, and redeploy cycles that are common in Java development.