@@ -29,4 +29,4 @@ public class RuoYiApplication
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.ruoyi.web.core.config;
|
||||
|
||||
import org.apache.catalina.connector.Connector;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
|
||||
/**
|
||||
* DevTools 热重启配置 - 修复 Windows 下端口未释放问题
|
||||
* 启用 SO_REUSEADDR,允许 DevTools 重启时立即复用端口
|
||||
* 仅在本地开发环境生效,不影响线上
|
||||
*/
|
||||
@Profile("local")
|
||||
@Configuration
|
||||
public class DevToolsConfig implements WebServerFactoryCustomizer<TomcatServletWebServerFactory> {
|
||||
|
||||
@Override
|
||||
public void customize(TomcatServletWebServerFactory factory) {
|
||||
factory.addConnectorCustomizers((Connector connector) -> {
|
||||
connector.setProperty("socket.soReuseAddress", "true");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,6 @@
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 9091
|
||||
# 优雅关闭,防止 Windows 下 DevTools 重启时端口冲突
|
||||
shutdown: graceful
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
@@ -52,11 +50,6 @@ spring:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
# 变更检测后的静默期(ms),给 IDE 编译留时间
|
||||
quiet-period: 400
|
||||
lifecycle:
|
||||
# 优雅关闭超时
|
||||
timeout-per-shutdown-phase: 10s
|
||||
# redis 配置
|
||||
# token配置
|
||||
token:
|
||||
|
||||
Reference in New Issue
Block a user