Skip to content

Commit 01812ea

Browse files
author
Washmore
committed
修改文档;
washmore
1 parent eee1886 commit 01812ea

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ mvn clean install -X -e -Dmaven.test.skip=true
5252
<plugin>
5353
<groupId>tech.washmore</groupId>
5454
<artifactId>maven-autocode-plugin</artifactId>
55-
<version>0.0.1-SNAPSHOT</version>
55+
<version>1.0.4-RELEASE</version>
5656
<configuration>
5757
<!-- 此处可选,指定配置文件路径,默认为本项目根目录下的config.json -->
5858
<configLocation>

autocode.core/src/main/java/tech/washmore/autocode/core/generator/mysql/MysqlAbstractDaoClassGenerator.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
* @since 2018/6/11
2626
*/
2727
public abstract class MysqlAbstractDaoClassGenerator implements DaoClassGenerator {
28-
29-
3028
@Override
3129
public final void generateDaos(List<TableModel> tableModels) {
3230
try {
@@ -298,7 +296,7 @@ public void insertDependencies(StringBuffer source, TableModel tm) {
298296

299297
List<String> methods = dataFile.getMethodInclude();
300298
for (String m : methods) {
301-
if (m.toUpperCase().contains("PrimaryKey" .toUpperCase()) &&
299+
if (m.toUpperCase().contains("PrimaryKey".toUpperCase()) &&
302300
tm.getPrimaryKey() != null && JavaDataType.时间.value.equals(tm.getPrimaryKey().getFieldType())) {
303301
StringUtils.appendAtline3IfNotExist(source, "import java.util.Date;");
304302
}

config配置详解.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"autoTypes": ["model","service","dao","mapper"],
55
"project": {
66
"path": "",
7+
"encoding": "UTF8",
78
"subModule": "autocode.test",
89
"javaRoot": "src/main/java",
910
"resourcesRoot": "src/main/resources",
@@ -73,11 +74,18 @@
7374
## project 项目基础配置
7475
### path
7576
指定文件生成的根目录,默认为当前项目跟目录
77+
### encoding
78+
指定生成文件的编码格式,此配置项优先级低于从`pom.xml`中获取
79+
```
80+
<properties>
81+
<project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
82+
</properties>
83+
```
7684
### subModule
7785
子模块名,适用于maven多module项目生成文件到指定子项目
7886
### javaRoot
7987
即maven项目build节点的
80-
```xml
88+
```
8189
<sourceDirectory>.../src/main/java</sourceDirectory>
8290
```
8391
中的结尾内容,默认为`src/main/java`

0 commit comments

Comments
 (0)