预设视频相关内容

This commit is contained in:
2021-08-17 08:10:58 +08:00
parent d8acadf2d7
commit 2f1bd267bf
21 changed files with 3728 additions and 24 deletions

View File

@@ -1,5 +1,6 @@
package com.yutou.nas.utils;
import com.yutou.nas.interfaces.ObjectInterface;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.annotation.AnnotationUtils;
@@ -20,7 +21,7 @@ public class AppTools {
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
}
public static void exec(String exec) {
public static void exec(String exec, ObjectInterface objectInterface, boolean isOutQQBot, boolean isInput) {
try {
Process process;
if (AppTools.isRuntimeSystemOfWindow()) {
@@ -38,10 +39,15 @@ public class AppTools {
}
);
}
processOut(process.getInputStream());
processOut(process.getErrorStream());
if (isInput) {
processOut(process.getInputStream(), objectInterface, isOutQQBot);
processOut(process.getErrorStream());
} else {
processOut(process.getErrorStream(), objectInterface, isOutQQBot);
processOut(process.getInputStream());
}
process.destroy();
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}
}
@@ -82,17 +88,17 @@ public class AppTools {
return classList;
}
public static List<String> getUrls(String packageName,String className){
List<Class> list= AppTools.scanClass(packageName, Controller.class);
List<String> urls=new ArrayList<>();
public static List<String> getUrls(String packageName, String className) {
List<Class> list = AppTools.scanClass(packageName, Controller.class);
List<String> urls = new ArrayList<>();
for (Class aClass : list) {
if(className!=null&&!aClass.getSimpleName().equals(className)){
if (className != null && !aClass.getSimpleName().equals(className)) {
continue;
}
Method[] methods= aClass.getDeclaredMethods();
Method[] methods = aClass.getDeclaredMethods();
for (Method method : methods) {
RequestMapping ls=method.getAnnotation(RequestMapping.class);
if(ls!=null) {
RequestMapping ls = method.getAnnotation(RequestMapping.class);
if (ls != null) {
urls.add(ls.value()[0]);
}
}