激情久久久_欧美视频区_成人av免费_不卡视频一二三区_欧美精品在欧美一区二区少妇_欧美一区二区三区的

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

PHP教程|ASP.NET教程|JAVA教程|ASP教程|編程技術(shù)|正則表達(dá)式|C/C++|IOS|C#|Swift|Android|JavaScript|易語言|

服務(wù)器之家 - 編程語言 - JAVA教程 - Spring Boot 配置 IDEA和DevTools 熱部署的方法

Spring Boot 配置 IDEA和DevTools 熱部署的方法

2021-03-31 13:17Java之家 JAVA教程

這篇文章主要介紹了Spring Boot 配置 IDEA和DevTools 熱部署的方法,需要的朋友可以參考下

MAVEN 配置

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?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>
  <groupId>cn.globalrave</groupId>
  <artifactId>bar-web</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>bar-web</name>
  <description>Bar project for Spring Boot</description>
  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.6.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
  </properties>
  <dependencies>
    <!--微信-->
    <dependency>
      <groupId>com.github.sd4324530</groupId>
      <artifactId>fastweixin</artifactId>
      <version>1.3.15</version>
    </dependency>
    <!--mysql 驅(qū)動(dòng)-->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
    </dependency>
    <!--mybatis ORM-->
    <dependency>
      <groupId>org.mybatis.spring.boot</groupId>
      <artifactId>mybatis-spring-boot-starter</artifactId>
      <version>1.3.0</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-aop</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-cache</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-freemarker</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-websocket</artifactId>
    </dependency>
    <!--熱部署-->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <!--熱部署配置-->
        <configuration>
          <fork>true</fork>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

 IDEA 配置

•CTRL + SHIFT + A 查找 勾選 make project automatically 選項(xiàng)

•ctrl+shift+alt+/ 查找Registry 勾選 compiler.automake.allow.when.app.running 選項(xiàng)

DevTools 配置

默認(rèn)改變 /META-INF/maven, /META-INF/resources, /resources, /static, /public or /templates 等目錄文件,會重新重啟項(xiàng)目,當(dāng)然我們編輯靜態(tài)文件不想重啟項(xiàng)目可以配置

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.

總結(jié)

以上所述是小編給大家介紹的Spring Boot 配置 IDEA和DevTools 熱部署的方法,希望對大家有所幫助,如果大家 有任何疑問歡迎給我留言,小編會及時(shí)回復(fù)大家的!

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 亚洲一区二区三区视频免费 | 欧美18videos性处按摩 | 日本高清在线免费 | 色诱亚洲精品久久久久久 | 他也色在线视频 | 在线观看精品视频 | 韩国一级免费视频 | 91看片欧美| 久久精品一二三区白丝高潮 | 亚洲网站在线 | 亚州精品在线视频 | 91精品国产一区二区三区动漫 | 第四色成人网 | 精品在线观看一区二区 | 成人免费观看49www在线观看 | 鲁丝一区二区三区不属 | 13一14毛片免费看 | 一区国产精品 | 91精品国产综合久久男男 | 西川av在线一区二区三区 | 美国黄色小视频 | 国产精品爱久久久久久久 | 男人天堂免费 | 31freehdxxxx欧美| 斗破苍穹在线免费 | 亚洲成人在线免费 | 日韩av官网| 老司机免费福利午夜入口ae58 | 亚洲精品一区二区三区免 | 特逼视频 | 久久午夜神器 | 欧美成人精品一区二区男人小说 | 他也色在线视频 | 成人在线视频在线观看 | 99精品视频在线观看免费播放 | 久久成人精品视频 | 日韩视频一区二区三区四区 | 中文字幕网址 | 草久视频在线观看 | 中文字幕在线日韩 | 亚洲性综合网 |