JEECG-BOOT 2.0.2版本发布

This commit is contained in:
zhangdaihao
2019-07-05 15:38:38 +08:00
parent 2917239a9d
commit 31422b1ea8
424 changed files with 34593 additions and 20808 deletions

View File

@ -18,10 +18,10 @@ spring:
username: jeecgos@163.com
password: ??
properties:
mail:
smtp:
mail:
smtp:
auth: true
starttls:
starttls:
enable: true
required: true
## quartz定时任务,采用数据库方式
@ -57,8 +57,11 @@ spring:
datasource:
druid:
stat-view-servlet:
enabled: true
loginUsername: admin
loginPassword: 123456
web-stat-filter:
enabled: true
dynamic:
druid: # 全局druid参数绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
# 连接池的配置信息
@ -111,7 +114,17 @@ spring:
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
global-config:
# 关闭MP3.0自带的banner
banner: false
db-config:
#主键类型 0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
id-type: 4
# 默认数据库表下划线命名
table-underline: true
#configuration:
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#jeecg专用配置
jeecg :
path :

View File

@ -57,8 +57,11 @@ spring:
datasource:
druid:
stat-view-servlet:
enabled: true
loginUsername: admin
loginPassword: 123456
web-stat-filter:
enabled: true
dynamic:
druid: # 全局druid参数绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
# 连接池的配置信息
@ -111,7 +114,14 @@ spring:
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
global-config:
# 关闭MP3.0自带的banner
banner: false
db-config:
#主键类型 0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
id-type: 4
# 默认数据库表下划线命名
table-underline: true
#jeecg专用配置
jeecg :
path :

View File

@ -57,8 +57,11 @@ spring:
datasource:
druid:
stat-view-servlet:
enabled: true
loginUsername: admin
loginPassword: 123456
web-stat-filter:
enabled: true
dynamic:
druid: # 全局druid参数绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
# 连接池的配置信息
@ -111,6 +114,17 @@ spring:
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
global-config:
# 关闭MP3.0自带的banner
banner: false
db-config:
#主键类型 0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
id-type: 4
# 默认数据库表下划线命名
table-underline: true
#configuration:
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#jeecg专用配置
jeecg :
path :

View File

@ -1,7 +1,14 @@
(_) | | | |
${AnsiColor.BRIGHT_BLUE}
(_) | | | |
_ ___ ___ ___ __ _ ______| |__ ___ ___ | |_
| |/ _ \/ _ \/ __/ _` |______| '_ \ / _ \ / _ \| __|
| | __/ __/ (_| (_| | | |_) | (_) | (_) | |_
| |\___|\___|\___\__, | |_.__/ \___/ \___/ \__|
_/ | __/ |
|__/ |___/
|__/ |___/
${AnsiColor.BRIGHT_GREEN}
Jeecg Boot Version: 2.0.2
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
${AnsiColor.BLACK}

View File

@ -125,19 +125,14 @@ public class ${entityName}Controller {
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
@DeleteMapping(value = "/delete")
public Result<${entityName}> delete(@RequestParam(name="id",required=true) String id) {
Result<${entityName}> result = new Result<${entityName}>();
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);
if(${entityName?uncap_first}==null) {
result.error500("未找到对应实体");
}else {
boolean ok = ${entityName?uncap_first}Service.removeById(id);
if(ok) {
result.success("删除成功!");
}
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
try {
${entityName?uncap_first}Service.removeById(id);
} catch (Exception e) {
log.error("删除失败",e.getMessage());
return Result.error("删除失败!");
}
return result;
return Result.ok("删除成功!");
}
/**
@ -230,9 +225,7 @@ public class ${entityName}Controller {
params.setNeedSave(true);
try {
List<${entityName}> list${entityName}s = ExcelImportUtil.importExcel(file.getInputStream(), ${entityName}.class, params);
for (${entityName} ${entityName?uncap_first}Excel : list${entityName}s) {
${entityName?uncap_first}Service.save(${entityName?uncap_first}Excel);
}
${entityName?uncap_first}Service.saveBatch(list${entityName}s);
return Result.ok("文件导入成功!数据行数:" + list${entityName}s.size());
} catch (Exception e) {
log.error(e.getMessage(),e);

View File

@ -29,7 +29,9 @@
<#else>
</#if>
</#list>
</template>
<#if (columns?size>1) >
</template>
</#if>
<a-col :md="6" :sm="8" >
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>

View File

@ -117,19 +117,14 @@ public class ${entityName}Controller {
* @return
*/
@DeleteMapping(value = "/delete")
public Result<${entityName}> delete(@RequestParam(name="id",required=true) String id) {
Result<${entityName}> result = new Result<${entityName}>();
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);
if(${entityName?uncap_first}==null) {
result.error500("未找到对应实体");
}else {
boolean ok = ${entityName?uncap_first}Service.removeById(id);
if(ok) {
result.success("删除成功!");
}
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
try {
${entityName?uncap_first}Service.removeById(id);
} catch (Exception e) {
log.error("删除失败",e.getMessage());
return Result.error("删除失败!");
}
return result;
return Result.ok("删除成功!");
}
/**
@ -218,9 +213,7 @@ public class ${entityName}Controller {
params.setNeedSave(true);
try {
List<${entityName}> list${entityName}s = ExcelImportUtil.importExcel(file.getInputStream(), ${entityName}.class, params);
for (${entityName} ${entityName?uncap_first}Excel : list${entityName}s) {
${entityName?uncap_first}Service.save(${entityName?uncap_first}Excel);
}
${entityName?uncap_first}Service.saveBatch(list${entityName}s);
return Result.ok("文件导入成功!数据行数:" + list${entityName}s.size());
} catch (Exception e) {
log.error(e.getMessage(),e);

View File

@ -29,7 +29,9 @@
<#else>
</#if>
</#list>
</template>
<#if (columns?size>1) >
</template>
</#if>
<a-col :md="6" :sm="8" >
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>

View File

@ -129,17 +129,14 @@ public class ${entityName}Controller {
* @return
*/
@DeleteMapping(value = "/delete")
public Result<${entityName}> delete(@RequestParam(name="id",required=true) String id) {
Result<${entityName}> result = new Result<${entityName}>();
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);
if(${entityName?uncap_first}==null) {
result.error500("未找到对应实体");
}else {
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
try {
${entityName?uncap_first}Service.delMain(id);
result.success("删除成功!");
} catch (Exception e) {
log.error("删除失败",e.getMessage());
return Result.error("删除失败!");
}
return result;
return Result.ok("删除成功!");
}
/**

View File

@ -128,17 +128,14 @@ public class ${entityName}Controller {
* @return
*/
@DeleteMapping(value = "/delete")
public Result<${entityName}> delete(@RequestParam(name="id",required=true) String id) {
Result<${entityName}> result = new Result<${entityName}>();
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);
if(${entityName?uncap_first}==null) {
result.error500("未找到对应实体");
}else {
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
try {
${entityName?uncap_first}Service.delMain(id);
result.success("删除成功!");
} catch (Exception e) {
log.error("删除失败",e.getMessage());
return Result.error("删除失败!");
}
return result;
return Result.ok("删除成功!");
}
/**