网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

SpringBoot如何配置IDEA和DevTools热部署

这篇文章将为大家详细讲解有关Spring Boot如何配置IDEA和DevTools热部署,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

成都创新互联是一家集网站建设,七星关区企业网站建设,七星关区品牌网站建设,网站定制,七星关区网站建设报价,网络营销,网络优化,七星关区网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。

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 等目录文件,会重新重启项目,当然我们编辑静态文件不想重启项目可以配置

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热部署”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。


名称栏目:SpringBoot如何配置IDEA和DevTools热部署
文章起源:http://bjjierui.cn/article/jhhshc.html

其他资讯