Skip to content

Commit 8a2a130

Browse files
author
li-guohao
committed
fix: 插件启动时RestTemp为null
1 parent 60f1bc9 commit 8a2a130

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

CHANGELOG.MD

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

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

5+
# 0.12.9
6+
7+
## 修复
8+
9+
- 插件启动时RestTemp为null
10+
511
# 0.12.8
612

713
## 优化

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
group=run.ikaros.plugin.alist
22
description=A ikaros plugin for alist.
3-
version=0.12.8
3+
version=0.12.9

src/main/java/run/ikaros/plugin/alist/AListClient.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,17 @@ public void destroy() throws Exception {
366366
@Override
367367
public void afterPropertiesSet() throws Exception {
368368
log.debug("init alist token afterPropertiesSet.");
369-
if (Objects.isNull(token) || StringUtils.isBlank(token.getToken())) {
370-
// token is null, get config from db.
371-
updateOperateByToken().subscribe();
372-
}
373369

374370
// init rest temp
375371
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
376372
factory.setConnectTimeout(10000); // 设置连接超时时间,10s
377373
factory.setReadTimeout(10000);
378374
restTemplate = new RestTemplate(factory);
375+
376+
if (Objects.isNull(token) || StringUtils.isBlank(token.getToken())) {
377+
// token is null, get config from db.
378+
updateOperateByToken().subscribe();
379+
}
379380
}
380381

381382

src/main/resources/plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: PluginAList
44
# plugin entry class that extends BasePlugin
55
clazz: run.ikaros.plugin.alist.AListPlugin
66
# plugin 'version' is a valid semantic version string (see semver.org).
7-
version: 0.12.8
7+
version: 0.12.9
88
requires: ">=0.12.1"
99
author:
1010
name: Ikaros OSS Team

0 commit comments

Comments
 (0)