| | |
| | | throw new Exception("尚未配置异常信息"); |
| | | } |
| | | |
| | | String exceptionName = NameUtil.getDefaultExceptionName(config.getEntity()); |
| | | String path = getDirPath(config.getService().getException().getPkg()); |
| | | try { |
| | | ExceptionVO vo = new ExceptionVO.Builder().setEntity(config.getEntity()).setPackageName(config.getService().getException().getPkg()).setBase(new ClassInfo(base.getSimpleName(), base.getName())).build(); |
| | | String result = GeneraterUtil.createException(vo); |
| | | //保存 |
| | | saveFile(result, path); |
| | | saveFile(result, new File(path, exceptionName + ".java").getAbsolutePath()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | if (config.getService().getException() != null) { |
| | | createException(Exception.class); |
| | | } |
| | | |
| | | QueryVO queryVO = createQuery(config.getService().getQueryPackage()); |
| | | |
| | | ClassInfo query = new ClassInfo(queryVO.getClassName(), queryVO.getPackageName() + "." + queryVO.getClassName()); |