Changes
parent
e474cb3d82
commit
e82c31dd70
|
@ -79,4 +79,5 @@ public class GenerateConstant {
|
|||
" }\n" +
|
||||
"}";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ public class RuleEditionController {
|
|||
} else {
|
||||
log.info("没有找到文件");
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<RuleEdition> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(
|
||||
RuleEdition::getRuleKind, ruleEdition.getRuleKind()
|
||||
|
|
|
@ -22,48 +22,48 @@ public class JavaCodeScan {
|
|||
|
||||
/**
|
||||
* 扫描本路径下java所有源文件 并创建为file文件
|
||||
* @param filePath 文件路径
|
||||
*
|
||||
* @param filePath 文件路径
|
||||
* @return
|
||||
*/
|
||||
|
||||
public static File[] javaSourceScanByPath(String filePath){
|
||||
public static File[] javaSourceScanByPath(String filePath) {
|
||||
|
||||
return filterFileBySuf(filePath,JAVA_SOURCE_SUF);
|
||||
return filterFileBySuf(filePath, JAVA_SOURCE_SUF);
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫描本路径下java所有源文件 并创建为file文件
|
||||
* @param filePath 文件路径
|
||||
*
|
||||
* @param filePath 文件路径
|
||||
* @return
|
||||
*/
|
||||
public static File[] javaBinaryByPath(String filePath){
|
||||
public static File[] javaBinaryByPath(String filePath) {
|
||||
|
||||
return filterFileBySuf(filePath,JAVA_BINARY_SUF);
|
||||
return filterFileBySuf(filePath, JAVA_BINARY_SUF);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验是否为java文件 是 返回File 否 抛出异常
|
||||
*
|
||||
* @param filePath
|
||||
* @return
|
||||
*/
|
||||
public static File isJavaSourceScanByPath(String filePath){
|
||||
public static File isJavaSourceScanByPath(String filePath) {
|
||||
File file = new File(filePath);
|
||||
if (file.isFile()){
|
||||
if (file.isFile()) {
|
||||
return file;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param filePath 文件路径
|
||||
* @param suf 扫描后缀
|
||||
* @param suf 扫描后缀
|
||||
* @return
|
||||
*/
|
||||
public static File[] filterFileBySuf(String filePath,String suf){
|
||||
public static File[] filterFileBySuf(String filePath, String suf) {
|
||||
//创建需要扫描的文件夹
|
||||
File file = new File(filePath);
|
||||
//列出所有的筛选suf结尾的文件集
|
||||
|
@ -74,7 +74,6 @@ public class JavaCodeScan {
|
|||
return false;
|
||||
} else {
|
||||
log.info("扫描到{}文件->{}", suf, name);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue