[manager] 监控参数接口修改,jar启动修复
This commit is contained in:
@@ -8,8 +8,8 @@
|
|||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>manager</artifactId>
|
<artifactId>manager</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<mysql.version>8.0.16</mysql.version>
|
<mysql.version>8.0.16</mysql.version>
|
||||||
@@ -94,4 +94,21 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>2.4.13</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -34,7 +34,7 @@ public class AppController {
|
|||||||
@ApiOperation(value = "查询监控类型的参数结构", notes = "根据app查询指定监控类型的需要输入参数的结构")
|
@ApiOperation(value = "查询监控类型的参数结构", notes = "根据app查询指定监控类型的需要输入参数的结构")
|
||||||
public ResponseEntity<Message<List<ParamDefine>>> queryAppParamDefines(
|
public ResponseEntity<Message<List<ParamDefine>>> queryAppParamDefines(
|
||||||
@ApiParam(value = "监控类型名称", example = "api") @PathVariable("app") String app) {
|
@ApiParam(value = "监控类型名称", example = "api") @PathVariable("app") String app) {
|
||||||
List<ParamDefine> paramDefines = appService.getAppParamDefines(app);
|
List<ParamDefine> paramDefines = appService.getAppParamDefines(app.toLowerCase());
|
||||||
return ResponseEntity.ok(new Message<>(paramDefines));
|
return ResponseEntity.ok(new Message<>(paramDefines));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class AppServiceImpl implements AppService, CommandLineRunner {
|
|||||||
if (appFile.exists()) {
|
if (appFile.exists()) {
|
||||||
try (FileInputStream fileInputStream = new FileInputStream(appFile)) {
|
try (FileInputStream fileInputStream = new FileInputStream(appFile)) {
|
||||||
Job app = yaml.loadAs(fileInputStream, Job.class);
|
Job app = yaml.loadAs(fileInputStream, Job.class);
|
||||||
appDefines.put(app.getApp(), app);
|
appDefines.put(app.getApp().toLowerCase(), app);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
@@ -91,7 +91,7 @@ public class AppServiceImpl implements AppService, CommandLineRunner {
|
|||||||
if (appFile.exists()) {
|
if (appFile.exists()) {
|
||||||
try (FileInputStream fileInputStream = new FileInputStream(appFile)) {
|
try (FileInputStream fileInputStream = new FileInputStream(appFile)) {
|
||||||
ParamDefineDto paramDefine = yaml.loadAs(fileInputStream, ParamDefineDto.class);
|
ParamDefineDto paramDefine = yaml.loadAs(fileInputStream, ParamDefineDto.class);
|
||||||
paramDefines.put(paramDefine.getApp(), paramDefine.getParam());
|
paramDefines.put(paramDefine.getApp().toLowerCase(), paramDefine.getParam());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
|||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
|
|
||||||
import javax.validation.ConstraintViolationException;
|
|
||||||
import javax.validation.ValidationException;
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import static com.usthe.common.util.CommonConstants.DETECT_FAILED;
|
import static com.usthe.common.util.CommonConstants.DETECT_FAILED;
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ param:
|
|||||||
required: false
|
required: false
|
||||||
- field: ssl
|
- field: ssl
|
||||||
name: 启动SSL
|
name: 启动SSL
|
||||||
type: radio
|
type: boolean
|
||||||
required: false
|
required: false
|
||||||
|
# 当type为boolean时,前端用switch展示开关
|
||||||
# 当type为radio单选框,checkbox复选框时,option表示可选项值列表
|
# 当type为radio单选框,checkbox复选框时,option表示可选项值列表
|
||||||
option: Yes,No
|
option: Yes,No
|
||||||
Reference in New Issue
Block a user