修复: 全局参数保存接口 @RequestBody 类型改为 Map 接收 JSON
This commit is contained in:
@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@@ -39,7 +40,8 @@ public class AiAlgorithmController {
|
||||
|
||||
@Operation(summary = "保存算法全局参数")
|
||||
@PostMapping("/global-params/{algoCode}")
|
||||
public void saveGlobalParams(@PathVariable String algoCode, @RequestBody String globalParams) {
|
||||
public void saveGlobalParams(@PathVariable String algoCode, @RequestBody Map<String, String> body) {
|
||||
String globalParams = body.get("globalParams");
|
||||
algorithmService.saveGlobalParams(algoCode, globalParams);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user