Skip to content

Commit 945956c

Browse files
committed
fix: use server shell tool order
1 parent 1f15815 commit 945956c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

boot/src/main/java/com/reajason/javaweb/boot/controller/ConfigController.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.reajason.javaweb.boot.controller;
22

33
import com.reajason.javaweb.boot.entity.Config;
4-
import com.reajason.javaweb.memshell.server.AbstractShell;
4+
import com.reajason.javaweb.memshell.Packers;
55
import com.reajason.javaweb.memshell.Server;
66
import com.reajason.javaweb.memshell.ShellTool;
7-
import com.reajason.javaweb.memshell.Packers;
7+
import com.reajason.javaweb.memshell.server.AbstractShell;
88
import org.springframework.http.ResponseEntity;
99
import org.springframework.web.bind.annotation.CrossOrigin;
1010
import org.springframework.web.bind.annotation.RequestMapping;
@@ -29,9 +29,8 @@ public ResponseEntity<?> config() {
2929
if (shell == null) {
3030
continue;
3131
}
32-
ShellTool[] supportedShellTools = ShellTool.values();
3332
Map<String, Set<String>> map = new LinkedHashMap<>(16);
34-
for (ShellTool shellTool : supportedShellTools) {
33+
for (ShellTool shellTool : shell.getSupportedShellTools()) {
3534
Set<String> supportedShellTypes = shell.getSupportedShellTypes(shellTool);
3635
if (supportedShellTypes.isEmpty()) {
3736
continue;

0 commit comments

Comments
 (0)