chore(deps): 更新Spring Boot版本并优化项目配置

- 将Spring Boot父版本从3.5.9升级到3.5.10
- 修复文件上传路径中用户名前缺少斜杠的问题
This commit is contained in:
2026-02-06 11:36:04 +08:00
parent c362f70ad3
commit b3eaa44c7d
34 changed files with 119 additions and 20 deletions
@@ -50,7 +50,7 @@ public class KitFileLocalUploadHelper {
if (StrUtil.isBlank(currentUserName)) {
return PATH_MAC.replace("${appName}", SystemConst.CURRENT_APP_NAME).replace("${username}", "");
}
return PATH_MAC.replace("${appName}", SystemConst.CURRENT_APP_NAME).replace("${username}", currentUserName);
return PATH_MAC.replace("${appName}", SystemConst.CURRENT_APP_NAME).replace("${username}", "/" + currentUserName);
}
return PATH_LINUX.replace("${appName}", SystemConst.CURRENT_APP_NAME);
}
@@ -62,12 +62,12 @@ public class KitWsServer {
* @param message 客户端发送过来的消息
*/
@OnMessage
public void onMessage(String message, Session session) {
public void onMessage(String message, Session session) throws IOException {
KitWsMessage wsMessage = JSON.parseObject(message, KitWsMessage.class);
String bizCode = wsMessage.getBizCode();
Object data = wsMessage.getData();
log.info("收到来 sid={} 的信息: message={}, bizCode={}, data={}", sid, message, bizCode,
JSON.toJSONString(data));
log.info("收到来 sid={} 的信息: message={}, bizCode={}, data={}", sid, message, bizCode, JSON.toJSONString(data));
session.getBasicRemote().sendText(message);
}
/**
@@ -102,7 +102,7 @@ public class KitWsServer {
/**
* 精准推送消息
*/
public void sendMessage(KitWsMessage message, @PathParam("sid") String sid) {
public void sendMessage(KitWsMessage message, @PathParam("sid") String sid) throws IOException {
String body = JSON.toJSONString(message);
// log.info("推送消息到{}, 推送内容:{}", sid, message);
try {
@@ -71,6 +71,14 @@ public class SystemMenuController {
return ResponseEntity.ok(systemMenuTbs);
}
@ApiOperation("返回全部的菜单")
@PostMapping(value = "/listRoleMenuByPid")
@PreAuthorize("@el.check('menu:list','roles:list')")
public ResponseEntity<List<SystemMenuTb>> listRoleMenuByPid(@RequestParam Long pid) {
List<SystemMenuTb> systemMenuTbs = systemMenuService.listMenuByPid(pid, true);
return ResponseEntity.ok(systemMenuTbs);
}
@ApiOperation("根据菜单ID返回所有子节点ID, 包含自身ID")
@PostMapping(value = "/listChildMenuSetByMenuId")
@PreAuthorize("@el.check('menu:list','roles:list')")
@@ -25,7 +25,7 @@ import java.util.List;
public class GenCode {
private static final String ADDR = "127.0.0.1";
private static final Integer PORT = 23306;
private static final Integer PORT = 3306;
private static final String DATABASE_NAME = "cutejava";
private static final String DATABASE_USER = "root";
private static final String DATABASE_PWD = "kd123456";
@@ -0,0 +1,31 @@
/*
* Copyright 2021-2026 Odboy
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.odboy.util;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.junit.jupiter.api.Test;
public class KitDateUtilTest {
@Test
public void testGetWeekDay() {
SimpleDateFormat simpleDateformat = new SimpleDateFormat("E");
assertEquals(simpleDateformat.format(new Date()), KitDateUtil.getWeekDay());
}
}
@@ -0,0 +1,30 @@
/*
* Copyright 2021-2026 Odboy
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.odboy.util;
/**
* 钉钉 Teambition 实际工时数计算
*/
public class WorkTimeTests {
public static void main(String[] args) {
// 总工作时长(时)
double totalHour = 11;
// 实际工作时长(天),一天8小时工作制
double actualHour = totalHour / 8.0;
System.err.println("actualHour=" + actualHour + " 天");
}
}
+3 -4
View File
@@ -19,8 +19,8 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<!-- <version>3.3.13</version>-->
<version>3.5.9</version>
<!-- <version>3.3.13</version>-->
<version>3.5.10</version>
</parent>
<properties>
@@ -40,7 +40,6 @@
<undertow.version>2.3.22.Final</undertow.version>
<freemarker.version>2.3.34</freemarker.version>
<p6spy.version>3.9.1</p6spy.version>
<knife4j.version>4.5.0</knife4j.version>
<mysql.version>9.5.0</mysql.version>
<ip2region.version>3.5.7</ip2region.version>
<!-- <springaop.version>1.9.7</springaop.version>-->
@@ -189,7 +188,7 @@
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>${knife4j.version}</version>
<version>4.5.0</version>
</dependency>
<!-- Mysql依赖包 -->