IDEA develop plug-ins

  1. Alibaba Java Code Guidelines

    Alibaba launched a statute of Java code scanning plug-in, according to "Ali Baba Java Development Manual" provisions of the code style and quality of real-time detection, constraints. Strong push. eclipsAnd IDEAhas a corresponding plug-ins. Installation and use tutorial, see the official documentation.
    Tutorial: https://github.com/alibaba/p3c/wiki/IDEA%E6%8F%92%E4%BB%B6%E4%BD%BF%E7%94%A8%E6%96%87%E6 % A1% A3

  2. GsonFormate
    JSON Plug quickly generate entity classes, specific use and configure keyboard shortcuts to find Google.

  3. lombok
    We java development process, there are often routine, repetitive work. such as:

    • It generates get and set methods according to member variables

    • The constructor of the class member variables generated

    • Override toString () and hashCode method

    • Introducing logging framework logFactory, for printing log

      These are some repetitive movements, template code. Every time manually generate a waste of time, but also adds a lot of redundant code. We can use lombok plugin to solve this problem. So that our coding efficiency has been greatly improved!

      We need to use the pomintroduction of dependent files

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

      Example:

      @Data  // 等于getter/setter方法
      @NoArgsConstructor  //无参构造
      @AllArgsConstructor // 全参构造
      @Slf4j  // 等于logger
      public class Article {
          private Long id;
          private String author;
          private String title;
          private String content;
          private Date createTime;
          private List<Reader> reader;
      
          @Override
          public String toString() {
              return "Article{" +
                      "id=" + id +
                      ", author='" + author + '\'' +
                      ", title='" + title + '\'' +
                      ", content='" + content + '\'' +
                      ", createTime=" + createTime +
                      ", reader=" + reader +
                      '}';
          }
      }

      Although the editors have shortcuts can be generated, but this is not it more simple and efficient!

  4. devtools Hot deployment

    In springbootproject development, particularly easy to use.

    • The introduction of dependence

      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-devtools</artifactId>
         <optional>true</optional>
      </dependency>
    • Add Configuration

      <build>
          <plugins>
              <plugin>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-maven-plugin</artifactId>
                  <configuration>
                      <fork>true</fork>
                  </configuration>
              </plugin>
          </plugins>
      </build>
    • Set IDEA
      Double-click shift> Search Registry> select the tick compiler.automake.allow.when.app.running.
      File> Settings> Build,Execution,Deplyment> Compiler, Select the tick Build project automatically.

      Enjoy it!

  5. Maven Helper

    In the pom.xmlmiddle you can see all the dependencies, easy to troubleshoot problems.

Continually updated. . . . . .

Above a few really lazy shots are direct plug-in download store, restart the editor on it.

有问题的可以留言,有更好的也可以推荐一下,多谢大家!

Guess you like

Origin www.cnblogs.com/gyyyblog/p/11979783.html