根据此文 http://www.jb51.net/article/112473.htm 在 pom 文件中加入
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.6.RELEASE</version>
</dependency>
</dependencies>
</plugin>
然后想实现热加载
可是很容易出现端口号被占用的状况,而且即使有时候没出现这种状况,也没能够热加载
我仔细的在每次启动前把占用端口号的进程关掉,确保没有进程使用该端口再启动的
Failed to start end point associated with ProtocolHandler [http-nio-8001]
java.net.BindException: Address already in use: bind
The Tomcat connector configured to listen on port 8001 failed to start. The port may already be in use or the connector may be misconfigured.
1
wzdbsss 2017-09-21 20:04:30 +08:00 via Android
这个热加载是新增类后都能热加载?
|
2
uxstone 2017-09-21 21:08:13 +08:00
debug 启动才能热加载吧 ....
|
3
z742364692 2017-09-22 01:41:20 +08:00 via iPhone
都是可以热加载的,风扇噪音巨大,遂关之
|
5
jack80342 2017-10-31 21:53:53 +08:00
这几天刚刚翻译了 Spring Boot 最新的官方文档,欢迎👏fork,https://www.gitbook.com/book/jack80342/spring-boot/details
|