SpringBoot Actual E-commerce project Mall (30K + STAR)

Abstract

Summary of the usual work in the common 12 IDEA plug-in, back-end and front-end have, attached my use skills, after the development of efficiency bar!

Lombok

Lombok provides an interesting addition to Java projects, using its annotations to effectively resolve tedious and repetitive code such as setters, getters, tostrings, equals, hashCode, and non-null judgments.

  • For example, let’s add @getter and @setter annotations to a class:
* Created by Macro on 2018/10/29. */
@Getter
@Setter
public class OmsMoneyInfoParam {
    private Long orderId;
    private BigDecimal freightAmount;
    private BigDecimal discountAmount;
    private Integer status;
}
Copy the code
  • Lombok will automatically generate Getter and Setter methods for all properties for us.

Free MyBatis Plugin

MyBatis extension can jump freely between Mapper interface method and XML implementation, and can also be used to generate some XML implementation with one key.

  • The arrow to the left of the method in the Mapper interface can jump directly to the corresponding XML implementation;

  • You can also jump directly from the arrow to the left of Statement to the corresponding Mapper interface method.

  • You can also go throughAlt+EnterKey combination directly generates the XML implementation of the new method, is not very convenient to use!

MyBatis Log Plugin

Sometimes we need SQL statements generated during the run to help us troubleshoot some problems. This plugin can restore the SQL log output by Mybatis to a complete SQL statement, without the need for manual transformation.

  • First we need to open the plugin window;

  • When we call a method, the console outputs 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: 1Copy the code
  • The plugin will automatically convert it to 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
  • There are times when you need to convert logs that are not on your own consoleSQL TextFunction:

  • Copy the log we need to convert directly and clickRestore SqlButton.

RestfulToolkit

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

  • You can go through the top rightRestServicesButton to display overview information about the interfaces in the project;

  • You can use the search button to search for the corresponding interface according to the URL.

  • An interface test request can be made using the HTTP request tool at the bottom;

  • By right-clicking on the interface method can generate query parameters, request parameters, request URL;

  • You can directly generate the JSON corresponding to the entity class by right-clicking on the entity class.

Translation

A translation plug-in, support Google, Youdao, Baidu translation, for us to see the source code to see the comments are very helpful!

  • Directly select the content to be translated, click the right button to find the translation button;

  • Direct use ofTranslation documentThe entire document can be translated;

  • You can also directly translate the specified content using the translate button in the upper right corner.

GsonFormat

This plugin can convert JSON strings into entity classes, which is easy to use when you want to create entity classes based on JSON strings.

  • First we need to create an entity class, and then right-click on the class nameGenerateAnd then selectGsonFormat;

  • Enter the JSON string we need to convert:

  • Optionally change the property name and type:

  • Click OK to generate the entity class directly.

Grep Console

A plugin that helps you analyze console logs. Different levels of logs can be highlighted in different colors. It can also be used to search logs by keyword.

  • When logs of the project are printed, logs of different log levels are displayed in different colors.

  • If you need to change the color scheme, yesToolsOpen the configuration menu for the plug-in.

  • Then modify the color scheme through the Configuration menu;

  • You can use it by right-clicking on the consoleGrepButton to bring up the log analysis window:

  • Then search directly by keyword.

Alibaba Java Coding Guidelines

Alibaba “Java Development Manual” supporting plug-in, can real-time detection of code does not conform to the manual regulations, help you code out of the efficient, code out of the quality.

  • For example, there’s this in the manual;

  • The plugin will automatically detect and prompt when we violate the manual regulations.

  • At the same time, it provides the function of one-key detection of all code specifications and switching languages.

  • If you want to change the detection rule of a certain protocol, you can set itEditor->InspectionsModify.

Maven Helper

The Maven dependency conflict resolution helper can quickly find dependency conflicts in a project and resolve them!

  • We can go throughpom.xmlBottom of the fileRely on the analysis ofTAB to view all dependencies in the current project

  • throughconflictButton we can filter out all conflicting dependencies on the current projectguavaDependencies have conflicts, currently used is18.0Version;

  • Select the conflicting dependency and clickExcludeButton to directly exclude the dependency;

  • At the same timepom.xmlIs also added to the dependency<exclusion>Label, isn’t it very convenient!

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.

  • At this point you can see the statistics of the code for our projects, such as my open source projectmallIn thejavaThe code size is2818kB, the number of lines85645.

Vue.js

Vue. Js supports plugins, you can create.vue files based on the template, and you can also make intelligent hints for Vue related code.

  • After the plug-in is enabled, you can create one based on the template.vueFile;

  • When we write in the tagv-The instruction in Vue is prompted when the code begins.

element

Element-ui supports plugins that intelligently hint at the tags in element-UI, so you don’t have to write code blindly!

  • When we write toel-The element-UI associated components are prompted when the tag begins.

The public,

Mall project full set of learning tutorials serialized, pay attention to the public account for the first time.