IDEA improves the speed of front-end development

Idea hot deployment Settings

instructions

  • Artifact is not used for this configuration, as some tutorials online use CTRL + Shift + Alt +S to deploy by packing modules, but not in this article.
  • This article focuses on configuring POM.xml

steps

  1. Change the pom. XML

    It is important to note that the corresponding folder in pom.xml has the main function. Pox. XML is changed in the project that needs to be updated. There is no necessary relationship between the parent folder and the child folder.

    Reference blog.csdn.net/w105021/art…

<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>true</scope> <optional>true</optional> </dependency> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <! -- Without this configuration, Executions <execution> <goals> --> <executions> <executions> <executions> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build>Copy the code

Idea will prompt import. Click

  1. Select the automatic build project

    In turn, click File – > Settings – > Build, Executions, and Deployment – > Compiler, check the shown below:

  2. Using the shortcut Ctrl + Shift + Alt + \, click Registry and check the box for Value as follows:

  3. Configure application.yml to disable caching

   spring:
     thymeleaf:
       prefix: classpath:/templates/
       suffix: .html
       mode: HTML
       encoding: utf-8
       servlet:
         content-type: text/html
       cache: false
Copy the code
  1. Now, you can change the HTML file, CTRL + S to save the changes, refresh the screen, or re-click the child page to see the changes without redeploying Tomact.