fix: harden gzip decode and release 0.4.5

Avoid ZipException when Vert.x already decompressed gzip bodies, keep jackson-databind on the IDE classpath, and show a real build version instead of unknown.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
q
2026-08-18 01:00:32 +08:00
parent f3da45bb16
commit 054e9cc1ec
9 changed files with 42 additions and 11 deletions
@@ -162,13 +162,18 @@ public class CommonUtil {
try (var is = CommonUtil.class.getClassLoader().getResourceAsStream("app.properties")) {
if (is != null) {
properties.load(is);
if (!properties.isEmpty()) {
appVersion = properties.getProperty("app.version") + "build" + properties.getProperty("build");
String version = properties.getProperty("app.version");
String build = properties.getProperty("build");
if (version != null && !version.contains("${")) {
appVersion = version + "build" + (build == null || build.contains("${") ? "" : build);
}
}
} catch (IOException e) {
} catch (Exception e) {
LOGGER.error("读取app.properties失败", e);
}
if (appVersion == null) {
appVersion = "unknown";
}
}
return appVersion;
}