Skip to content

Commit

Permalink
nats.server添加默认值,修复主题拼接问题
Browse files Browse the repository at this point in the history
  • Loading branch information
TiyaAnlite committed Jun 24, 2024
1 parent efec548 commit 58c0e9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class Tips {
}

public class Nats {
public String server;
public String server = "";
public String prefix = "minecodecraft";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public byte[] toBytes() {
public void publish() {
if (MineCodeCraftMod.hasNatsConnection()) {
MineCodeCraftMod.getNatsConnection().publish(
new StringJoiner(MineCodeCraftMod.getConfig().getConfigBean().nats.prefix, ".", this.msgSubject).toString(),
new StringJoiner(".").
add(MineCodeCraftMod.getConfig().getConfigBean().nats.prefix).
add(this.msgSubject).toString(),
this.toBytes());
}
};
Expand Down

0 comments on commit 58c0e9b

Please sign in to comment.