Maven 配置
<? xml version = "1.0" Encoding = "utf-8"?> <project xmlns = "http://maven.apache.org/pom/4.0.0" xmlns: xsi = "http://www.w3.org/2001/xmlschema-instance" XSI: ScheMalocation = "http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion> 4.0.0 </ Modelversion> <proupId> CN.globalrave </prebunId> </ Modelversion> <proupId> CN.globalrave </preamId> </ Modelversion> <ProupId> CN.globalrave </preamId> </ Modelversion> <ProupId> CN.Globalrave </preamId> <eRtifActid> Barw </ ArtifAcd> ArtifacT> <version> 0.0.1-snapshot </ version> <packaging> jar </packaging> <name> bar-web </name> <description> Projet BAR pour Spring Boot </ Description> <parent> <proupId> org.springframework.boot </prômId> <Artifactid> printemps-boot-starter-parent </ptetifactid> <version> 1.5.6. <! - Recherche parent du référentiel -> </parent> <properties> <project.build.sourceencoding> utf-8 </project.build.sourceencoding> <project.reportting.outputending> utf-8 </project.report.outputerSice> <java.version> 1.8 </java.version> <! - 微信 -> <dependency> <proupId> com.github.sd4324530 </prôdId> <Artifactid> Fastweixin </letifactid> <in version> 1.3.15 </ version> </dependency> <! - MySQL 驱动 -> <Dedency> <ProupId> MySQL </roulid> <ArtefactId> MySQL-Connector-Java </ Arfactive> </Dependency> <! - Mybatis Orm -> <Dependance> <ProupId> org.mybatis.Spring.boot </proupId> <Artefactid> Mybatis-Spring-Boot-Starter </RetifActid> <version> 1.3.0 </ version> <GroupId> org.springframework.boot </proupId> <Artifactid> printemps-boot-starter-aop </lefactive> </dEpendency> <Dedency> <ProupId> org.springframework.boot </prouprid> <pritency> <pedency> <GroupId> org.springframework.boot </proupId> <Artifactid> printemps-boot-starter-freemarker </ artifactid> </dependency> <dependency> <proupId> org.springframework.boot </proupId> <Artifactid> Spring-boot-starter-web </tatifactid> <GroupId> org.springframework.boot </proupId> <Artifactid> printemps-boot-starter-websocket </ Artifactid> </Dependency> <! - 热部署 -> <dependency> <proupId> org.springframework.boot </proupId> <Artifactid> Spring-Boot-Devtools </letifactive> </Dependency> <Dedency> <ProupId> org.springFramework.boot </proncId> <Artifactid> Spring-Boot-Starter-Test </Retifactid> <POPE> TEST </POPE> </ Dependency> </Dedency> <uild> <flugins> <Glugin> <proupId> Org.SpringFramework. <ArtefactId> Spring-Boot-Maven-Plugin </ ArfactId> <! - 热部署配置 -> <Iconguration> <Fork> true </fork> </FIFIGIGURATION> </GLANGIN> </GLINGINS> </DUCIDE> </ Project>
Idée 配置
• ctrl + shift + a 查找 勾选 faire le projet automatiquement 选项
• Ctrl + Shift + Alt + / 查找 Registry 勾选 Compiler.AutoMake.Allow.When.App.Running 选项
Devtools 配置
默认改变 / meta-inf / maven, / méta-inf / ressources, / ressources, / statique, / public ou / modèles 等目录文件 , 会重新重启项目 , 当然我们编辑静态文件不想重启项目可以配置
printemps.devtools.restart.exclude = static / **, public / ** # devtools (devtoolsproperties) printemps.devtools.livereload.enabled = true # activer un livereload.com compatible server.spring.devtools.livereload.port = 35729 # server. port.spring.devtools.restart.additional-exclude = # motifs supplémentaires qui devraient être exclus de la déclenchement d'un redémarrage complet.spring.devtools.restart.additional-paths = # chemins supplémentaires pour regarder pour modifier.spring.devtools.Restart.enable restart.spring.devtools.restart.exclude = meta-inf / maven / **, meta-inf / ressources / **, ressources / **, static / **, public / **, templates / **, ** / * test.class, ** / * tests.class, git.properties # motifs qui doivent être exclus à partir de Triging a Full a Full A Full A Full restart.spring.devtools.restart.poll-interval = 1000 # durée (en millisecondes) pour attendre entre le sondage pour les modifications de classe de classe.spring.devtools.restart.quiet-période = 400 # quantité de temps tranquille (dans millecondes) requis sans aucun changement de classe avant un repos = # ne nom d'un fichier spécifique qui, une fois modifié, déclenchera la vérification du redémarrage. Si non spécifié, un changement de fichier ClassPath déclenchera le redémarrage. # Devtools distant (RemoteDevToolsProperties) Spring.devtools.remote.context-path = /. ~~ printemps-boot! ~ # Contexte Path.Enabled = True # Icable Remote Debug support.spring.devtools.remote.debug.local-port = 8000 # local Demote Debug Server Port.spring.devtools.remote.proxy.host = # L'hôte du proxy à utiliser pour se connecter à l'application distante.spring.devtools.remote.proxy.port = # The Port of the Proxy pour utiliser pour se connecter pour le télécom application.spring.devtools.remote.restart.enabled = true # activer la télécommande restart.spring.devtools.remote.secret = # un secret partagé requis pour établir une connexion (requise pour activer la prise en charge à distance) .spring.devtools.remote.secret-header-nom = x-Auth-token # head HELER HELER pour transférer le secret de partage.
总结
以上所述是小编给大家介绍的 Spring Boot 配置 Idea 和 Devtools 热部署的方法 , 希望对大家有所帮助 , 如果大家 有任何疑问欢迎给我留言 , 小编会及时回复大家的!