I. Overview of the way of implementation
Note the following hot deployment methods in idea is not turned on automatically compiled by default, manual compilation requires shortcut keys (ctrl+shift+f9), automatic compilation of the modified configuration as follows: (note refresh not too fast, there will be 1-2 seconds delay)
File-settings-compiler-build Project automatically
Second, Spring-boot-devtools
Direct introduction of dependencies in POM
<Dependency> <groupId>Org.springframework.boot</groupId> <Artifactid>Spring-boot-devtools</Artifactid> <Optional>True</Optional></Dependency>
set the following two items (the first item is set to set the second item directly )
1) "File", "Settings", "Build,execution,deplyment", "Compiler", tick "Build Project automatically".
2) key combination: "shift+ctrl+alt+/", select "Registry", tick "compiler.automake.allow.when.app.running".
After that, you can run it directly!
third, spring-loaded
adding dependencies in plugins
<Build> <Plugins> <plugin> <groupId>Org.springframework.boot</groupId> <Artifactid>Spring-boot-maven-plugin</Artifactid> <Dependencies> <!--Spring Hot Deployment - <Dependency> <groupId>Org.springframework</groupId> <Artifactid>springloaded</Artifactid> <version>1.2.6.RELEASE</version> </Dependency> </Dependencies> </plugin> </Plugins> </Build>
If the dependency hint not found, first write in the above let maven download, and then move to plugin inside
Command Line window start
Find the path to Pom.xml, if you open the pom and then hover over the tab to see it, or right-click the->file path on the POM
Open the cmd window under this path (win can quickly open in the corresponding path via shift), enter the start command
MVN Spring-boot:run
This allows you to modify the code in the IDE to implement hot loading!
There is also a complex way to specify the location of the jar package through the start parameter, feel more complex, temporarily do not repeat, you can refer to: here
Iv. release of spring-boot procedures
1.jar form
Through Maven Direct install, the project package and related dependencies also hit the same jar, Maven life cycle, refer to Here
Start:
2.war form
Reference: Https://www.cnblogs.com/gdpuzxs/p/7224959.html?utm_source=itdadao&utm_medium=referral
:https://www.cnblogs.com/coder-wzr/p/7860778.html
Note: Context-path is consistent with Warname
Springboot Thermal Deployment (ii)--springboot hot Deployment and release