Skip to content

Commit 5ce740f

Browse files
committed
更新README.md说明文件
1 parent 81d55a5 commit 5ce740f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SpringBootGenerator
1+
# SpringBootGenerator(SpringBoot2.0版)
22

3+
> SpringBoot2.0版(SpringBoot1.5版切换分支(springboot1.5))
34
> 参考:[https://github.com/lihengming/spring-boot-api-project-seed](https://github.com/lihengming/spring-boot-api-project-seed)
45
56
### 项目相关

src/test/java/com/example/generator/CodeGenerator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public static void genModelAndMapper(String tableName, String modelName) {
154154
}
155155

156156
if (generator.getGeneratedJavaFiles().isEmpty() || generator.getGeneratedXmlFiles().isEmpty()) {
157-
throw new RuntimeException("生成Model和Mapper失败:" + warnings);
157+
throw new RuntimeException("生成Model和Mapper失败(请检查数据库是否连接正常及表名是否正确以及权限是否缺失):" + warnings);
158158
}
159159
if (StringUtils.isEmpty(modelName)) {
160160
modelName = tableNameConvertUpperCamel(tableName);
@@ -197,7 +197,7 @@ public static void genService(String tableName, String modelName) {
197197
new FileWriter(file1));
198198
System.out.println(modelNameUpperCamel + "ServiceImpl.java 生成成功");
199199
} catch (Exception e) {
200-
throw new RuntimeException("生成Service失败", e);
200+
throw new RuntimeException("生成Service失败(请检查数据库是否连接正常及表名是否正确以及权限是否缺失)", e);
201201
}
202202
}
203203

@@ -231,7 +231,7 @@ public static void genController(String tableName, String modelName) {
231231

232232
System.out.println(modelNameUpperCamel + "Controller.java 生成成功");
233233
} catch (Exception e) {
234-
throw new RuntimeException("生成Controller失败", e);
234+
throw new RuntimeException("生成Controller失败(请检查数据库是否连接正常及表名是否正确以及权限是否缺失)", e);
235235
}
236236

237237
}

0 commit comments

Comments
 (0)