| | |
| | | * @throws Exception |
| | | */ |
| | | public static void createMongoDao(MongoDBDaoData data, String targetDir) throws Exception { |
| | | FreemarkerUtils.renderingTemplateAndGenerateFile(SpringComponentGenerater.class.getClassLoader().getResourceAsStream("mongoDBDao.template"), new File(targetDir, data.getDaoName() + ".java").getAbsolutePath(), data); |
| | | FreemarkerUtils.renderingTemplateAndGenerateFile(SpringComponentGenerater.class.getClassLoader().getResourceAsStream("generater/mongoDBDao.template"), new File(targetDir, data.getDaoName() + ".java").getAbsolutePath(), data); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static void createService(ServiceData data, String targetDir) throws Exception { |
| | | |
| | | FreemarkerUtils.renderingTemplateAndGenerateFile(SpringComponentGenerater.class.getClassLoader().getResourceAsStream("service.template"), new File(targetDir, data.getServiceClassName() + ".java").getAbsolutePath(), data); |
| | | FreemarkerUtils.renderingTemplateAndGenerateFile(SpringComponentGenerater.class.getClassLoader().getResourceAsStream("generater/service.template"), new File(targetDir, data.getServiceClassName() + ".java").getAbsolutePath(), data); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static void createServiceImpl(ServiceData data, String targetDir) throws Exception { |
| | | |
| | | FreemarkerUtils.renderingTemplateAndGenerateFile(SpringComponentGenerater.class.getClassLoader().getResourceAsStream("serviceImpl.template"), new File(targetDir, data.getServiceClassName() + "Impl.java").getAbsolutePath(), data); |
| | | FreemarkerUtils.renderingTemplateAndGenerateFile(SpringComponentGenerater.class.getClassLoader().getResourceAsStream("generater/serviceImpl.template"), new File(targetDir, data.getServiceClassName() + "Impl.java").getAbsolutePath(), data); |
| | | } |
| | | |
| | | |