Skip to content

Commit

Permalink
[ISSUE alibaba#10593]修改 nacos-contrl-plugin 的数据落地位置 (alibaba#10638)
Browse files Browse the repository at this point in the history
* 修改nacos-contrl-plugin插件中落地数据的 defaultBaseDir() 方法,使其不产生特殊的文件夹而落到运行目录的data文件夹下

* remove unused import
  • Loading branch information
DarrenLuo authored Jun 15, 2023
1 parent 4de440d commit 069c6f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions plugin/control/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
<artifactId>nacos-common</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-sys</artifactId>
<scope>provided</scope>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.alibaba.nacos.api.common.Constants;
import com.alibaba.nacos.plugin.control.Loggers;
import com.alibaba.nacos.sys.env.EnvUtil;
import org.slf4j.Logger;

import java.io.File;
Expand Down Expand Up @@ -55,7 +56,7 @@ public void setLocalRruleBaseDir(String localRruleBaseDir) {
}

private static String defaultBaseDir() {
return LocalDiskRuleStorage.class.getResource("/").getPath();
return EnvUtil.getNacosHome();
}

private File getConnectionRuleFile() {
Expand Down

0 comments on commit 069c6f9

Please sign in to comment.