Skip to content

Commit

Permalink
fix: 插件启动时RestTemp为null
Browse files Browse the repository at this point in the history
  • Loading branch information
li-guohao committed Jun 11, 2024
1 parent 60f1bc9 commit 8a2a130
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

更新日志文档,版本顺序从新到旧,最新版本在最前(上)面。

# 0.12.9

## 修复

- 插件启动时RestTemp为null

# 0.12.8

## 优化
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=run.ikaros.plugin.alist
description=A ikaros plugin for alist.
version=0.12.8
version=0.12.9
9 changes: 5 additions & 4 deletions src/main/java/run/ikaros/plugin/alist/AListClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,16 +366,17 @@ public void destroy() throws Exception {
@Override
public void afterPropertiesSet() throws Exception {
log.debug("init alist token afterPropertiesSet.");
if (Objects.isNull(token) || StringUtils.isBlank(token.getToken())) {
// token is null, get config from db.
updateOperateByToken().subscribe();
}

// init rest temp
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
factory.setConnectTimeout(10000); // 设置连接超时时间,10s
factory.setReadTimeout(10000);
restTemplate = new RestTemplate(factory);

if (Objects.isNull(token) || StringUtils.isBlank(token.getToken())) {
// token is null, get config from db.
updateOperateByToken().subscribe();
}
}


Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: PluginAList
# plugin entry class that extends BasePlugin
clazz: run.ikaros.plugin.alist.AListPlugin
# plugin 'version' is a valid semantic version string (see semver.org).
version: 0.12.8
version: 0.12.9
requires: ">=0.12.1"
author:
name: Ikaros OSS Team
Expand Down

0 comments on commit 8a2a130

Please sign in to comment.