這篇文章將為大家詳細講解有關Spring Boot如何配置IDEA和DevTools熱部署,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
成都創(chuàng)新互聯(lián)是一家集網(wǎng)站建設,七星關區(qū)企業(yè)網(wǎng)站建設,七星關區(qū)品牌網(wǎng)站建設,網(wǎng)站定制,七星關區(qū)網(wǎng)站建設報價,網(wǎng)絡營銷,網(wǎng)絡優(yōu)化,七星關區(qū)網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強企業(yè)競爭力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時我們時刻保持專業(yè)、時尚、前沿,時刻以成就客戶成長自我,堅持不斷學習、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實用型網(wǎng)站。
MAVEN 配置
4.0.0 cn.globalrave bar-web 0.0.1-SNAPSHOT jar bar-web Bar project for Spring Boot org.springframework.boot spring-boot-starter-parent 1.5.6.RELEASE UTF-8 UTF-8 1.8 com.github.sd4324530 fastweixin 1.3.15 mysql mysql-connector-java org.mybatis.spring.boot mybatis-spring-boot-starter 1.3.0 org.springframework.boot spring-boot-starter-aop org.springframework.boot spring-boot-starter-cache org.springframework.boot spring-boot-starter-freemarker org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-websocket org.springframework.boot spring-boot-devtools runtime org.springframework.boot spring-boot-starter-test test org.springframework.boot spring-boot-maven-plugin true
IDEA 配置
?CTRL + SHIFT + A 查找 勾選 make project automatically 選項
?ctrl+shift+alt+/ 查找Registry 勾選 compiler.automake.allow.when.app.running 選項
DevTools 配置
默認改變 /META-INF/maven, /META-INF/resources, /resources, /static, /public or /templates 等目錄文件,會重新重啟項目,當然我們編輯靜態(tài)文件不想重啟項目可以配置
spring.devtools.restart.exclude=static/**,public/** # DEVTOOLS (DevToolsProperties) spring.devtools.livereload.enabled=true # Enable a livereload.com compatible server. spring.devtools.livereload.port=35729 # Server port. spring.devtools.restart.additional-exclude= # Additional patterns that should be excluded from triggering a full restart. spring.devtools.restart.additional-paths= # Additional paths to watch for changes. spring.devtools.restart.enabled=true # Enable automatic restart. spring.devtools.restart.exclude=META-INF/maven/**,META-INF/resources/**,resources/**,static/**,public/**,templates/**,**/*Test.class,**/*Tests.class,git.properties # Patterns that should be excluded from triggering a full restart. spring.devtools.restart.poll-interval=1000 # Amount of time (in milliseconds) to wait between polling for classpath changes. spring.devtools.restart.quiet-period=400 # Amount of quiet time (in milliseconds) required without any classpath changes before a restart is triggered. spring.devtools.restart.trigger-file= # Name of a specific file that when changed will trigger the restart check. If not specified any classpath file change will trigger the restart. # REMOTE DEVTOOLS (RemoteDevToolsProperties) spring.devtools.remote.context-path=/.~~spring-boot!~ # Context path used to handle the remote connection. spring.devtools.remote.debug.enabled=true # Enable remote debug support. spring.devtools.remote.debug.local-port=8000 # Local remote debug server port. spring.devtools.remote.proxy.host= # The host of the proxy to use to connect to the remote application. spring.devtools.remote.proxy.port= # The port of the proxy to use to connect to the remote application. spring.devtools.remote.restart.enabled=true # Enable remote restart. spring.devtools.remote.secret= # A shared secret required to establish a connection (required to enable remote support). spring.devtools.remote.secret-header-name=X-AUTH-TOKEN # HTTP header used to transfer the shared secret.
關于“Spring Boot如何配置IDEA和DevTools熱部署”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。