123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597 |
- package com.yihu.hos.system.service;
- import com.yihu.hos.common.constants.Constants;
- import com.yihu.hos.config.MongoConfig;
- import com.yihu.hos.core.datatype.StringUtil;
- import com.yihu.hos.core.encrypt.DES;
- import com.yihu.hos.core.file.FileUtil;
- import com.yihu.hos.services.ServiceFlowEventService;
- import com.yihu.hos.system.dao.FlowClassDao;
- import com.yihu.hos.system.dao.FlowDao;
- import com.yihu.hos.system.dao.FlowTempDao;
- import com.yihu.hos.system.model.SystemServiceFlow;
- import com.yihu.hos.system.model.SystemServiceFlowClass;
- import com.yihu.hos.system.model.SystemServiceFlowTemp;
- import com.yihu.hos.system.model.bo.ServiceFlow;
- import com.yihu.hos.system.service.intf.IFlowManage;
- import com.yihu.hos.web.framework.model.ActionResult;
- import com.yihu.hos.web.framework.model.DictItem;
- import com.yihu.hos.web.framework.model.Result;
- import com.yihu.hos.web.framework.util.GridFSUtil;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import org.springframework.transaction.annotation.Transactional;
- import org.springframework.web.multipart.commons.CommonsMultipartFile;
- import javax.annotation.Resource;
- import java.io.OutputStream;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.List;
- import java.util.Map;
- /**
- * 系统流程管理业务类
- *
- * @author HZY
- * @vsrsion 1.0
- * Created at 2016/8/19.
- */
- @Service("flowManager")
- public class FlowManager implements IFlowManage {
- public static final String BEAN_ID = "flowManager";
- @Autowired
- ServiceFlowEventService serviceFlowEventService;
- @Resource(name = "flowDao")
- private FlowDao flowDao;
- @Resource(name = FlowClassDao.BEAN_ID)
- private FlowClassDao flowClassDao;
- @Resource(name = FlowTempDao.BEAN_ID)
- private FlowTempDao flowTempDao;
- @Autowired
- private MongoConfig mongoConfig;
- @Override
- public Result getFlowList(Map<String, Object> params) throws Exception {
- return flowDao.getFlowList(params);
- }
- /**
- * @return List<ServiceFlow> 返回所有可运行流程
- * @throws Exception ...
- */
- public List<ServiceFlow> getServiceFlowList() throws Exception {
- List<ServiceFlow> serviceFlowList = new ArrayList<>();
- List<SystemServiceFlow> classFlowList = flowDao.getFlowList(Constants.CLASS);
- for (SystemServiceFlow systemServiceFlow : classFlowList) {
- ServiceFlow serviceFlow = new ServiceFlow();
- serviceFlow.setRouteCode(systemServiceFlow.getCode());
- serviceFlow.setFlowType(systemServiceFlow.getFileType());
- List<SystemServiceFlowClass> classList = flowClassDao.getFlowClassByFlowId(systemServiceFlow.getId());
- ArrayList<ServiceFlow.HandleFile> handleFileList = new ArrayList<>();
- for (SystemServiceFlowClass flowClass : classList) {
- ServiceFlow.HandleFile handleFile = serviceFlow.new HandleFile();
- handleFile.setFileType(Constants.CLASS);
- handleFile.setClassName(flowClass.getClassName());
- handleFile.setPackageName(flowClass.getPackageName());
- handleFile.setFilePath(flowClass.getClassPath());
- handleFile.setUsage(flowClass.getType());
- handleFileList.add(handleFile);
- }
- serviceFlow.setHandleFiles(handleFileList);
- serviceFlowList.add(serviceFlow);
- }
- List<SystemServiceFlow> javaFlowList = flowDao.getFlowList(Constants.JAVA);
- for (SystemServiceFlow systemServiceFlow : javaFlowList) {
- ServiceFlow serviceFlow = new ServiceFlow();
- serviceFlow.setRouteCode(systemServiceFlow.getCode());
- List<SystemServiceFlowTemp> tempList = flowTempDao.getFlowTempByFlowId(systemServiceFlow.getId());
- ArrayList<ServiceFlow.HandleFile> handleFileList = new ArrayList<>();
- for (SystemServiceFlowTemp flowTemp : tempList) {
- ServiceFlow.HandleFile handleFile = serviceFlow.new HandleFile();
- handleFile.setFileType(Constants.JAVA);
- handleFile.setClassName(flowTemp.getClassName());
- handleFile.setPackageName(flowTemp.getPackageName());
- handleFile.setFilePath(flowTemp.getClassPath());
- handleFile.setUsage(flowTemp.getType());
- handleFileList.add(handleFile);
- }
- serviceFlow.setHandleFiles(handleFileList);
- serviceFlowList.add(serviceFlow);
- }
- return serviceFlowList;
- }
- @Override
- public SystemServiceFlow getFlowById(Integer id) throws Exception {
- return flowDao.getEntity(SystemServiceFlow.class, id);
- }
- @Transactional
- public Result addFlow(SystemServiceFlow obj) throws Exception {
- obj.setCreateDate(new Date());
- flowDao.saveEntity(obj);
- if (Constants.CLASS.equals(obj.getFileType())) {
- List<SystemServiceFlowClass> flowClassList = obj.getFlowClassArray();
- for (SystemServiceFlowClass flowClass : flowClassList) {
- flowClass.setFlowId(obj.getId());
- flowDao.saveEntity(flowClass);
- //发送消息到MQ对列
- sendUpdateMessage(obj.getCode(), flowClass, Constants.FLOW_OP_ADD);
- }
- } else if (Constants.JAVA.equals(obj.getFileType())) {
- List<SystemServiceFlowTemp> flowTempList = obj.getFlowTempArray();
- for (SystemServiceFlowTemp flowTemp : flowTempList) {
- flowTemp.setFlowId(obj.getId());
- flowDao.saveEntity(flowTemp);
- }
- }
- return Result.success("保存成功");
- }
- @Transactional
- public Result updateFlow(SystemServiceFlow obj) throws Exception {
- SystemServiceFlow flow = flowDao.getEntity(SystemServiceFlow.class, obj.getId());
- flow.setCode(obj.getCode());
- flow.setName(obj.getName());
- flow.setPath(obj.getPath());
- flow.setChart(obj.getChart());
- flow.setValid(obj.getValid());
- flow.setFileType(obj.getFileType());
- if (Constants.JAVA.equals(flow.getFileType())) {
- List<SystemServiceFlowTemp> flowTempList = obj.getFlowTempArray();
- boolean succ = flowTempDao.deleteFlowTempByFlowId(obj.getId());
- if (succ) {
- for (SystemServiceFlowTemp flowTemp : flowTempList) {
- flowTempDao.saveEntity(flowTemp);
- }
- }
- } else if (Constants.CLASS.equals(flow.getFileType())) {
- List<Integer> classIds = flowClassDao.getFlowClassIds(obj.getId());//原flowclass集合
- List<SystemServiceFlowClass> flowClassList = obj.getFlowClassArray();
- SystemServiceFlowClass flowClassRoute = null;
- String oper = "";
- for (SystemServiceFlowClass flowClass : flowClassList) {
- if (flowClass.getId() != null) {
- classIds.remove(flowClass.getId());
- flowClassDao.updateEntity(flowClass);
- if (!flowClass.getType().equals(Constants.FLOW_TYPE_ROUTE)) {
- sendUpdateMessage(flow.getCode(), flowClass, Constants.FLOW_OP_UPDATE);
- } else {
- flowClassRoute = flowClass;
- oper = Constants.FLOW_OP_UPDATE;
- }
- } else {
- if (!flowClass.getType().equals(Constants.FLOW_TYPE_ROUTE)) {
- flowClassDao.saveEntity(flowClass);
- sendUpdateMessage(flow.getCode(), flowClass, Constants.FLOW_OP_ADD);
- } else {
- flowClassRoute = flowClass;
- oper = Constants.FLOW_OP_ADD;
- }
- }
- }
- //删除判断
- if (classIds != null && classIds.size() > 0) {
- for (Integer id : classIds) {
- SystemServiceFlowClass flowClass = getFlowClassById(id);
- flowClassDao.deleteEntity(flowClass);
- if (!flowClass.getType().equals(Constants.FLOW_TYPE_ROUTE)) {
- sendUpdateMessage(flow.getCode(), flowClass, Constants.FLOW_OP_DELETE);
- } else {
- flowClassRoute = flowClass;
- flowClassRoute.setIsUpdate("1");
- oper = Constants.FLOW_OP_DELETE;
- }
- }
- }
- if (flowClassRoute != null) {
- sendUpdateMessage(flow.getCode(), flowClassRoute, oper);
- }
- }
- flowDao.updateEntity(flow);
- return Result.success("更新成功");
- }
- @Transactional
- public Result deleteFlow(Integer id) throws Exception {
- SystemServiceFlow flow = flowDao.getEntity(SystemServiceFlow.class, id);
- List<SystemServiceFlowClass> flowClassList = flowClassDao.getFlowClassByFlowId(id);
- List<SystemServiceFlowClass> processorFlowClassList = new ArrayList<>();
- if (Constants.JAVA.equals(flow.getFileType())){
- flowTempDao.deleteFlowTempByFlowId(id);
- } else {
- for (SystemServiceFlowClass flowClass:flowClassList){
- flowClassDao.deleteEntity(flowClass);
- flowClass.setIsUpdate("1");
- //发送消息到MQ对列
- if (flowClass.getType().equals(Constants.FLOW_TYPE_ROUTE)) {
- sendUpdateMessage(flow.getCode(), flowClass, Constants.FLOW_OP_DELETE);
- } else {
- processorFlowClassList.add(flowClass);
- }
- }
- for (SystemServiceFlowClass serviceFlowClass : processorFlowClassList) {
- sendUpdateMessage(flow.getCode(), serviceFlowClass, Constants.FLOW_OP_DELETE);
- }
- }
- flowDao.deleteEntity(flow);
- return Result.success("删除成功");
- }
- /* =================================== flowClass 部分================================================*/
- @Override
- public Result getFlowClassList(Map<String, Object> params) throws Exception {
- return null;
- }
- @Override
- public List<SystemServiceFlowClass> getFlowClassByFlowId(Integer flowId) throws Exception {
- return flowClassDao.getFlowClassByFlowId(flowId);
- }
- public SystemServiceFlowClass getFlowClassById(Integer id) throws Exception {
- return flowClassDao.getEntity(SystemServiceFlowClass.class, id);
- }
- @Transactional
- public Result addFlowClass(SystemServiceFlowClass obj) throws Exception {
- flowDao.saveEntity(obj);
- return Result.success("保存成功");
- }
- @Transactional
- public Result updateFlowClass(SystemServiceFlowClass obj) throws Exception {
- return null;
- }
- @Transactional
- public boolean deleteFlowClassByFlowId(Integer flowId) {
- boolean succ = flowClassDao.deleteFlowClassByFlowId(flowId);
- return succ;
- }
- @Override
- public List<SystemServiceFlowTemp> getFlowTempByFlowId(Integer id) throws Exception {
- return flowTempDao.getFlowTempByFlowId(id);
- }
- //TODO
- @Override
- public boolean genFlewByflowTempId(Integer flowTempId) throws Exception {
- SystemServiceFlow flow = getFlowById(flowTempId);
- //生成新的route类
- //添加新processor记录
- return false;
- }
- @Override
- public Result uploadFile(CommonsMultipartFile file) {
- String dbName = "upload";
- String newFileName;
- try {
- newFileName = GridFSUtil.uploadFile(mongoConfig.mongoClient().getDatabase(dbName), file);
- if (!StringUtil.isEmpty(newFileName)) {
- return Result.success(DES.encrypt(newFileName, DES.COMMON_PASSWORD));
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- return Result.error("上传失败");
- }
- @Override
- public Result readFile(OutputStream os, String fileName) {
- String dbName = "upload";
- try {
- fileName = DES.decrypt(fileName, DES.COMMON_PASSWORD);
- GridFSUtil.readFile(mongoConfig.mongoClient().getDatabase(dbName), os, fileName);
- return Result.success("读取成功");
- } catch (Exception e) {
- e.printStackTrace();
- }
- return Result.error("读取失败");
- }
- /**
- * 发送MQ消息-更新路由
- * @param flowCode 服务流程Code标识
- * @param flowClass
- * @param operate
- */
- public void sendUpdateMessage(String flowCode,SystemServiceFlowClass flowClass,String operate){
- //发送消息到MQ对列
- if ("1".equals(flowClass.getIsUpdate()) && Constants.FLOW_TYPE_ROUTE.equals(flowClass.getType())) {
- //route
- switch (operate){
- case "add" : serviceFlowEventService.routeDefineAdded(flowCode, flowClass.getPackageName(), flowClass.getClassName(), flowClass.getClassPath()); break;
- case "delete" : serviceFlowEventService.routeDefineDelete(flowCode, flowClass.getPackageName(), flowClass.getClassName()); break;
- case "update" : serviceFlowEventService.routeDefineChanged(flowCode, flowClass.getPackageName(), flowClass.getClassName(), flowClass.getClassPath()); break;
- default : break;
- }
- } else if ("1".equals(flowClass.getIsUpdate()) && Constants.FLOW_TYPE_PROCESSOR.equals(flowClass.getType())) {
- //processor
- switch (operate){
- case "add" : serviceFlowEventService.processorAdded(flowCode, flowClass.getPackageName(), flowClass.getClassName(), flowClass.getClassPath()); break;
- case "delete" : serviceFlowEventService.processorDataDeleted(flowCode, flowClass.getPackageName(), flowClass.getClassName()); break;
- case "update" : serviceFlowEventService.processorDataChanged(flowCode, flowClass.getPackageName(), flowClass.getClassName(), flowClass.getClassPath()); break;
- default : break;
- }
- }
- }
- /**
- * 获取流程列表
- * @param type 流程的文件类型
- * @return
- * @throws Exception
- */
- @Override
- public ActionResult getFlowList(String type) throws Exception {
- List<SystemServiceFlow> flowList = flowDao.getFlowList(type);
- ActionResult re = new ActionResult();
- if (flowList != null && flowList.size() > 0) {
- List<DictItem> dictList = new ArrayList<>();
- for (SystemServiceFlow item : flowList) {
- DictItem dict = new DictItem();
- dict.setCode(item.getId().toString());
- dict.setValue(item.getName());
- dict.setExtend("");
- dictList.add(dict);
- }
- re.setData(dictList);
- }
- return re;
- }
- /**
- * 发送消息到broker,生成camel相关文件
- * @param flowTempId
- * @param newCron
- * @throws Exception
- */
- public Integer genCamelFile(String jobId,Integer flowTempId, String newCron) throws Exception {
- Long timestamp = System.currentTimeMillis();
- //发送生成processor文件的消息
- Integer newFlowId = sendAddProcessor(jobId,flowTempId, timestamp);
- if (newFlowId != null){
- //发送生成route文件的消息
- newFlowId = sendAddRoute(flowTempId, newFlowId, newCron);
- if (newFlowId !=null){
- return newFlowId;
- }else {
- System.out.println("生成route文件失败");
- return null;
- }
- }else {
- System.out.println("生成processor文件失败");
- return null;
- }
- }
- /**
- * 修改任务,修改camel相关文件
- * @param flowId 流程ID
- * @param newCron 新cron
- * @return
- * @throws Exception
- */
- @Override
- public Integer updateCamelFile(Integer flowTempId,Integer flowId, String newCron) throws Exception {
- /* 修改route文件无需重新生成flowClass记录,文件名根据className+routeId 生成;*/
- List<SystemServiceFlowTemp> flowTempRouters = flowTempDao.getFlowTemps(flowTempId, Constants.FLOW_TYPE_ROUTE);
- List<SystemServiceFlowClass> flowClassRouters = flowClassDao.getFlowClass(flowId, Constants.FLOW_TYPE_ROUTE);
- SystemServiceFlow flow = flowDao.getEntity(SystemServiceFlow.class,flowId);
- //route模板文件记录是否存在。不存在就返回。
- if (!flowTempRouters.isEmpty()){
- SystemServiceFlowTemp flowTemp =flowTempRouters.get(0);
- StringBuilder basePath = new StringBuilder();;
- if (flowTemp.getPackageName()!=null){
- String packagePath[] = flowTemp.getPackageName().split("\\.");
- for (int i=0;i<packagePath.length;i++){
- basePath.append(packagePath[i]).append("/");
- }
- }
- serviceFlowEventService.routeClassChanged(flow.getCode(),basePath.toString(), flowTemp.getClassName(), flowTemp.getClassPath(),newCron);
- return flowId;
- }
- return null;
- }
- /* ********************* 发送消息方式生成文件 ********************************/
- public Integer sendAddRoute(Integer tempId, Integer flowId, String newCron) throws Exception {
- List<SystemServiceFlowTemp> flowTempRouters = flowTempDao.getFlowTemps(tempId, Constants.FLOW_TYPE_ROUTE);
- SystemServiceFlow newFlow = getFlowById(flowId);
- //route模板文件记录是否存在。不存在就返回。
- if (!flowTempRouters.isEmpty()) {
- SystemServiceFlowTemp flowTemp = flowTempRouters.get(0);
- StringBuilder basePath = new StringBuilder();
- ;
- if (flowTemp.getPackageName() != null) {
- String packagePath[] = flowTemp.getPackageName().split("\\.");
- for (int i = 0; i < packagePath.length; i++) {
- basePath.append(packagePath[i]).append("/");
- }
- }
- //新增processor记录
- String deName = DES.decrypt(flowTemp.getClassPath(), DES.COMMON_PASSWORD);//吉阿米果的文件名
- String enClassName = DES.encrypt(deName.replace(".java", ".class"), DES.COMMON_PASSWORD);//生成机密过的classPath
- SystemServiceFlowClass newFlowClass = new SystemServiceFlowClass();
- newFlowClass.setPackageName(flowTemp.getPackageName());
- newFlowClass.setClassName(flowTemp.getClassName() + newFlow.getCode());
- newFlowClass.setClassPath(enClassName);
- newFlowClass.setFlowId(newFlow.getId());
- newFlowClass.setType(Constants.FLOW_TYPE_ROUTE);
- flowClassDao.saveEntity(newFlowClass);
- newFlowClass.setIsUpdate("1");
- //生成新的route文件
- String newFileName = genRouteJavaFile(newFlow.getCode(),flowTemp.getClassName(),deName,newCron);
- if (newFileName!=null){
- serviceFlowEventService.routeClassAdded(newFlow.getCode(), basePath.toString(), flowTemp.getClassName(), deName,newCron);
- return newFlow.getId();
- }else {
- System.out.println("生成route的java文件过程出错");
- return null;
- }
- }
- return null;
- }
- public Integer sendAddProcessor(String jobId,Integer flowId, Long timestamp) throws Exception {
- List<SystemServiceFlowTemp> flowTempRouters = flowTempDao.getFlowTemps(flowId, Constants.FLOW_TYPE_ROUTE);
- List<SystemServiceFlowTemp> flowTempProces = flowTempDao.getFlowTemps(flowId, Constants.FLOW_TYPE_PROCESSOR);
- SystemServiceFlow oldFlow = getFlowById(flowId);
- //route模板文件记录是否存在。不存在就返回。
- if (!flowTempRouters.isEmpty()) {
- //成功生成文件后,添加flow和flowclass记录
- SystemServiceFlow newFlow = new SystemServiceFlow();
- newFlow.setName(oldFlow.getName() + timestamp);
- newFlow.setCode(oldFlow.getCode() + timestamp);
- newFlow.setChart(oldFlow.getChart());
- newFlow.setValid(1);
- newFlow.setCreateDate(new Date());
- newFlow.setFileType(Constants.CLASS);
- flowDao.saveEntity(newFlow);
- //新增processor记录
- for (SystemServiceFlowTemp process : flowTempProces) {
- StringBuilder proPath = new StringBuilder();
- if (process.getPackageName() != null) {
- //生成“/"分割的包名
- String packagePath[] = process.getPackageName().split("\\.");
- for (int i = 0; i < packagePath.length; i++) {
- proPath.append(packagePath[i]).append("/");
- }
- }
- String deName = DES.decrypt(process.getClassPath(), DES.COMMON_PASSWORD);//吉阿米果的文件名
- String enClassName = DES.encrypt(deName.replace(".java", ".class"), DES.COMMON_PASSWORD);//生成机密过的classPath
- SystemServiceFlowClass processClass = new SystemServiceFlowClass();
- processClass.setPackageName(process.getPackageName());
- processClass.setClassName(process.getClassName());
- processClass.setClassPath(enClassName);
- processClass.setFlowId(newFlow.getId());
- processClass.setType(Constants.FLOW_TYPE_PROCESSOR);
- processClass.setIsUpdate("1");
- //生成新的java文件
- String newFileName = genProcessorJavaFile(jobId,newFlow.getCode(),deName,processClass.getClassName());
- if (newFileName!=null){
- //发送消息
- serviceFlowEventService.processorClassAdded(newFlow.getCode(),proPath.toString(), processClass.getClassName(), deName);
- flowClassDao.saveEntity(processClass);
- }else {
- System.out.println("生成processor的java文件过程出错");
- return null;
- }
- }
- return newFlow.getId();
- }
- return null;
- }
- /**
- * 生成Route流程的java文件
- * @param routeId 流程Id
- * @param className 模板类名
- * @param tempFilePath 模板文件路径
- * @param newCron cron表达式
- * @return
- */
- public static String genRouteJavaFile(String routeId,String className,String tempFilePath,String newCron) {
- try {
- String newFileName = className+routeId+".java";
- String newFilePath = "/temp/"+newFileName;
- String text = GridFSUtil.readFile("upload",tempFilePath);
- if (text.contains("?cron=")) {
- String oldStr = text.substring(text.indexOf("?cron=") + 6);
- String cron = oldStr.substring(0, oldStr.indexOf("\""));
- text = text.replace(cron,newCron);
- }
- //修改java类名
- if (text.contains(className)) {
- text = text.replace(className, className+routeId);//新类名规则=旧类名+routeId
- }
- //修改routeId;模板规则 routeId("routeId")
- text = text.replace("routeId(\"routeId\")", "routeId(\"" + routeId + "\")");
- boolean succ = FileUtil.writeFile(newFilePath,text,"UTF-8");
- //TODO 上传到GridFS
- if (succ){
- newFileName = GridFSUtil.uploadFile("upload", newFilePath, newFileName);
- }else {
- return null;
- }
- return newFileName;
- } catch (Exception e) {
- System.out.println("修改Route的java文件操作出错");
- e.printStackTrace();
- }
- return null;
- }
- /**
- * 生成processor的java文件
- * @param jobId 任务Id
- * @param routeId 流程Code
- * @param tempFilePath 模板文件名
- * @param className 模板类名
- * @return
- */
- public static String genProcessorJavaFile(String jobId,String routeId ,String tempFilePath, String className) {
- try {
- String newFileName = className+routeId+".java";
- String newFilePath = "/temp/"+className;
- String text = GridFSUtil.readFile("upload",tempFilePath);
- text = text.replace("jobId=jobId","jobId="+jobId);
- boolean succ = FileUtil.writeFile(newFilePath,text,"UTF-8");
- //TODO 上传到GridFS
- if (succ){
- newFileName = GridFSUtil.uploadFile("upload", newFilePath, newFileName);
- return newFileName;
- }
- } catch (Exception e) {
- System.out.println("生成processor的java文件操作出错");
- e.printStackTrace();
- }
- return null;
- }
- }
|