Skip to content

Commit 90750d4

Browse files
committed
1. 去除 mybatis 模板中的方括号[],使代码更美观
2. 修改模板里的类注释样式,使注释更规范
1 parent 11ad553 commit 90750d4

File tree

15 files changed

+71
-60
lines changed

15 files changed

+71
-60
lines changed

generator-web/src/main/resources/templates/code-generator/beetlsql/beetlcontroller.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import java.util.List;
77
import java.util.Map;
88

99
/**
10-
* ${classInfo.classComment}
11-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
12-
*/
10+
* @description ${classInfo.classComment}
11+
* @author ${authorName}
12+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
13+
*/
1314
@RestController
1415
@RequestMapping("/${classInfo.className?uncap_first}")
1516
public class ${classInfo.className}Controller {

generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentity.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import java.util.Date;
44
import java.util.List;
55

66
/**
7-
* ${classInfo.classComment}
8-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
9-
*/
7+
* @description ${classInfo.classComment}
8+
* @author ${authorName}
9+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
10+
*/
1011
@Data
1112
public class ${classInfo.className} implements Serializable {
1213

generator-web/src/main/resources/templates/code-generator/beetlsql/beetlentitydto.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import java.util.Date;
66
import java.util.List;
77

88
/**
9-
* ${classInfo.classComment}
10-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
9+
* @description ${classInfo.classComment}
10+
* @author ${authorName}
11+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
1112
*/
1213
@Data
1314
@ApiModel("${classInfo.classComment}")
@@ -23,4 +24,4 @@ public class ${classInfo.className}DTO {
2324
}
2425
</#if>
2526

26-
}
27+
}

generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdao.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
import java.util.List;
33

44
/**
5-
* ${classInfo.classComment}
6-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
7-
*/
5+
* @description ${classInfo.classComment}
6+
* @author ${authorName}
7+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
8+
*/
89
public interface I${classInfo.className}DAO {
910

1011
int add(${classInfo.className} ${classInfo.className?uncap_first});

generator-web/src/main/resources/templates/code-generator/jdbc-template/jtdaoimpl.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import org.springframework.stereotype.Repository;
66
import java.util.List;
77

88
/**
9-
* ${classInfo.classComment}
10-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
11-
*/
9+
* @description ${classInfo.classComment}
10+
* @author ${authorName}
11+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
12+
*/
1213
@Repository
1314
public class ${classInfo.className}DaoImpl implements I${classInfo.className}Dao{
1415

generator-web/src/main/resources/templates/code-generator/jpa/entity.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ import io.swagger.annotations.ApiModel;
1313
import io.swagger.annotations.ApiModelProperty;
1414

1515
/**
16-
* ${classInfo.classComment}
17-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
18-
*/
16+
* @description ${classInfo.classComment}
17+
* @author ${authorName}
18+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
19+
*/
1920
@Entity
2021
@Data
2122
@Table(name="${classInfo.tableName}")

generator-web/src/main/resources/templates/code-generator/jpa/jpacontroller.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ import java.util.List;
1515
import java.util.Map;
1616

1717
/**
18-
* ${classInfo.classComment}
19-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
20-
*/
18+
* @description ${classInfo.classComment}
19+
* @author ${authorName}
20+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
21+
*/
2122
@RestController
2223
@RequestMapping("/${classInfo.className?uncap_first}")
2324
public class ${classInfo.className}Controller {

generator-web/src/main/resources/templates/code-generator/jpa/repository.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ import org.springframework.data.jpa.repository.Query;
1414
import org.springframework.stereotype.Repository;
1515

1616
/**
17-
* ${classInfo.classComment}
18-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
19-
*/
17+
* @description ${classInfo.classComment}
18+
* @author ${authorName}
19+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
20+
*/
2021
@Repository
2122
public interface ${classInfo.className}Repository extends JpaRepository<${classInfo.className},Integer> {
2223

generator-web/src/main/resources/templates/code-generator/mybatis-plus/pluscontroller.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ import java.util.List;
1111
import java.util.Map;
1212

1313
/**
14-
* ${classInfo.classComment}
15-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
16-
*/
14+
* @description ${classInfo.classComment}
15+
* @author ${authorName}
16+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
17+
*/
1718
@RestController
1819
@RequestMapping("/${classInfo.className?uncap_first}")
1920
public class ${classInfo.className}Controller {

generator-web/src/main/resources/templates/code-generator/mybatis-plus/plusmapper.ftl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
33
import org.springframework.stereotype.Repository;
44

55
/**
6-
* ${classInfo.classComment}
7-
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
8-
*/
6+
* @description ${classInfo.classComment}
7+
* @author ${authorName}
8+
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
9+
*/
910
@Repository
1011
public interface ${classInfo.className}Mapper extends BaseMapper<${classInfo.className}> {
1112

0 commit comments

Comments
 (0)