OnestayIDEAOn the rightSpringBootMethods of hot deployment
staypom.xmlinOf In labelAdd the following configuration
And then find outCompiler, check aboveBuild project automatically, and then clickOKsign out
Then pressShift+Ctrl+Alt+/, pop up small box, selectRegistry
And then find outcompiler.automake.allow.when.app.runningAnd tick it, and then clickclosesign out
After completing the above steps, the hot deployment should be completed normally. If you modify the class or some static resources (such ashtml）, you can update the content without restarting.
2、 Hot deployment failure and solution
After the deployment was completed, I found that it was not successful, and then I opened itpom.xmlAn error is reported in red, and the error contents are as follows:
Failed to read artifact descriptor for org. springframework boot: spring-boot-devtools jar: 2.3.3. RELEASE
The question isjarThe package may have failed to download due to network problems, so the hot deployment failed.
With the most direct way, to your local warehouse to download the failurejarDelete the package, and then letmavenJust download it again (but only if you make sure that there is no problem with your network, otherwise the download will not succeed all the time when there is a problem)
How to find the corresponding download failurejarWhere’s the bag? The method is as follows
Go to your local warehouse and find the following location:
Your local warehouse location(in fact, go to your local warehouse and find it according to the string of characters behind the error messagejarPackage location)
For example, where is my local warehouseDDiscalrepositoryThen the address is:
Then delete all the files in the directory, and letMavenAutomatically download from the InternetjarJust a bag.
Finally, according to this problem also summarizes a solution to related problems. Ifpom.xmlReport error and promptFailed to read artifact descriptor for xxxxxxxx.jarThis kind of information, then generally isjarIf there is a problem with the package (for example, the download fails), you can use this method to delete it directly, and then let it downloadMavenIn most cases, downloading again will solve the problem.