mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 10:13:28 +08:00
update 移动模型设计器翻译方法
This commit is contained in:
parent
3b5e321085
commit
323f3a69d6
@ -1,11 +1,13 @@
|
||||
package org.dromara.workflow.controller;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.io.resource.ResourceUtil;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
@ -27,6 +29,8 @@ import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
@ -163,4 +167,15 @@ public class ActModelController extends BaseController {
|
||||
return actModelService.getGroups(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析翻译模型设计器内容
|
||||
*/
|
||||
@GetMapping(value = "/rest/stencil-sets/editor")
|
||||
public String getStencilset() {
|
||||
try (InputStream inputStream = ResourceUtil.getStream("static/stencilset.json")) {
|
||||
return IOUtils.toString(inputStream, StandardCharsets.UTF_8);
|
||||
} catch (Exception e) {
|
||||
throw new SecurityException("Error while loading stencil set", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.dromara.workflow.controller;
|
||||
|
||||
import cn.hutool.core.io.resource.ResourceUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* @author Tijs Rademakers
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/workflow/model")
|
||||
public class StencilsetRestResource {
|
||||
|
||||
@GetMapping(value = "/rest/stencil-sets/editor")
|
||||
public String getStencilset() {
|
||||
try (InputStream inputStream = ResourceUtil.getStream("static/stencilset.json")) {
|
||||
return IOUtils.toString(inputStream, StandardCharsets.UTF_8);
|
||||
} catch (Exception e) {
|
||||
throw new SecurityException("Error while loading stencil set", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user