Skip to content

Commit d177741

Browse files
committed
[代码完善](v2.5): v2.5 beta 更新部分依赖,优化druid配置,其他杂项优化
Closes elunez#339 2.5 Beta 详情:https://www.ydyno.com/archives/1225.html
1 parent 3f7c833 commit d177741

36 files changed

Lines changed: 129 additions & 102 deletions

eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ public class GenConfigController {
3939

4040
@ApiOperation("查询")
4141
@GetMapping(value = "/{tableName}")
42-
public ResponseEntity<Object> get(@PathVariable String tableName){
42+
public ResponseEntity<Object> query(@PathVariable String tableName){
4343
return new ResponseEntity<>(genConfigService.find(tableName), HttpStatus.OK);
4444
}
4545

4646
@ApiOperation("修改")
4747
@PutMapping
48-
public ResponseEntity<Object> emailConfig(@Validated @RequestBody GenConfig genConfig){
48+
public ResponseEntity<Object> update(@Validated @RequestBody GenConfig genConfig){
4949
return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig),HttpStatus.OK);
5050
}
5151
}

eladmin-generator/src/main/java/me/zhengjie/rest/GeneratorController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ public class GeneratorController {
4949

5050
@ApiOperation("查询数据库数据")
5151
@GetMapping(value = "/tables/all")
52-
public ResponseEntity<Object> getTables(){
52+
public ResponseEntity<Object> queryTables(){
5353
return new ResponseEntity<>(generatorService.getTables(), HttpStatus.OK);
5454
}
5555

5656
@ApiOperation("查询数据库数据")
5757
@GetMapping(value = "/tables")
58-
public ResponseEntity<Object> getTables(@RequestParam(defaultValue = "") String name,
58+
public ResponseEntity<Object> queryTables(@RequestParam(defaultValue = "") String name,
5959
@RequestParam(defaultValue = "0")Integer page,
6060
@RequestParam(defaultValue = "10")Integer size){
6161
int[] startEnd = PageUtil.transToStartEnd(page+1, size);
@@ -64,7 +64,7 @@ public ResponseEntity<Object> getTables(@RequestParam(defaultValue = "") String
6464

6565
@ApiOperation("查询字段数据")
6666
@GetMapping(value = "/columns")
67-
public ResponseEntity<Object> getTables(@RequestParam String tableName){
67+
public ResponseEntity<Object> queryColumns(@RequestParam String tableName){
6868
List<ColumnInfo> columnInfos = generatorService.getColumns(tableName);
6969
return new ResponseEntity<>(PageUtil.toPage(columnInfos,columnInfos.size()), HttpStatus.OK);
7070
}

eladmin-generator/src/main/java/me/zhengjie/utils/GenUtil.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
* @date 2019-01-02
3535
*/
3636
@Slf4j
37-
@SuppressWarnings("all")
3837
public class GenUtil {
3938

4039
private static final String TIMESTAMP = "Timestamp";
@@ -242,9 +241,9 @@ private static Map<String,Object> getGenMap(List<ColumnInfo> columnInfos, GenCon
242241
// 主键类型
243242
String colType = ColUtil.cloToJava(column.getColumnType());
244243
// 小写开头的字段名
245-
String changeColumnName = StringUtils.toCamelCase(column.getColumnName().toString());
244+
String changeColumnName = StringUtils.toCamelCase(column.getColumnName());
246245
// 大写开头的字段名
247-
String capitalColumnName = StringUtils.toCapitalizeCamelCase(column.getColumnName().toString());
246+
String capitalColumnName = StringUtils.toCapitalizeCamelCase(column.getColumnName());
248247
if(PK.equals(column.getKeyType())){
249248
// 存储主键类型
250249
genMap.put("pkColumnType",colType);

eladmin-logging/src/main/java/me/zhengjie/rest/LogController.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@ public void download(HttpServletResponse response, LogQueryCriteria criteria) th
5555
@ApiOperation("导出错误数据")
5656
@GetMapping(value = "/error/download")
5757
@PreAuthorize("@el.check()")
58-
public void errorDownload(HttpServletResponse response, LogQueryCriteria criteria) throws IOException {
58+
public void downloadErrorLog(HttpServletResponse response, LogQueryCriteria criteria) throws IOException {
5959
criteria.setLogType("ERROR");
6060
logService.download(logService.queryAll(criteria), response);
6161
}
6262
@GetMapping
6363
@ApiOperation("日志查询")
6464
@PreAuthorize("@el.check()")
65-
public ResponseEntity<Object> getLogs(LogQueryCriteria criteria, Pageable pageable){
65+
public ResponseEntity<Object> query(LogQueryCriteria criteria, Pageable pageable){
6666
criteria.setLogType("INFO");
6767
return new ResponseEntity<>(logService.queryAll(criteria,pageable), HttpStatus.OK);
6868
}
6969

7070
@GetMapping(value = "/user")
7171
@ApiOperation("用户日志查询")
72-
public ResponseEntity<Object> getUserLogs(LogQueryCriteria criteria, Pageable pageable){
72+
public ResponseEntity<Object> queryUserLog(LogQueryCriteria criteria, Pageable pageable){
7373
criteria.setLogType("INFO");
7474
criteria.setBlurry(SecurityUtils.getCurrentUsername());
7575
return new ResponseEntity<>(logService.queryAllByUser(criteria,pageable), HttpStatus.OK);
@@ -78,22 +78,22 @@ public ResponseEntity<Object> getUserLogs(LogQueryCriteria criteria, Pageable pa
7878
@GetMapping(value = "/error")
7979
@ApiOperation("错误日志查询")
8080
@PreAuthorize("@el.check()")
81-
public ResponseEntity<Object> getErrorLogs(LogQueryCriteria criteria, Pageable pageable){
81+
public ResponseEntity<Object> queryErrorLog(LogQueryCriteria criteria, Pageable pageable){
8282
criteria.setLogType("ERROR");
8383
return new ResponseEntity<>(logService.queryAll(criteria,pageable), HttpStatus.OK);
8484
}
8585

8686
@GetMapping(value = "/error/{id}")
8787
@ApiOperation("日志异常详情查询")
8888
@PreAuthorize("@el.check()")
89-
public ResponseEntity<Object> getErrorLogs(@PathVariable Long id){
89+
public ResponseEntity<Object> queryErrorLogs(@PathVariable Long id){
9090
return new ResponseEntity<>(logService.findByErrDetail(id), HttpStatus.OK);
9191
}
9292
@DeleteMapping(value = "/del/error")
9393
@Log("删除所有ERROR日志")
9494
@ApiOperation("删除所有ERROR日志")
9595
@PreAuthorize("@el.check()")
96-
public ResponseEntity<Object> delAllByError(){
96+
public ResponseEntity<Object> delAllErrorLog(){
9797
logService.delAllByError();
9898
return new ResponseEntity<>(HttpStatus.OK);
9999
}
@@ -102,7 +102,7 @@ public ResponseEntity<Object> delAllByError(){
102102
@Log("删除所有INFO日志")
103103
@ApiOperation("删除所有INFO日志")
104104
@PreAuthorize("@el.check()")
105-
public ResponseEntity<Object> delAllByInfo(){
105+
public ResponseEntity<Object> delAllInfoLog(){
106106
logService.delAllByInfo();
107107
return new ResponseEntity<>(HttpStatus.OK);
108108
}

eladmin-system/pom.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</properties>
2020

2121
<dependencies>
22-
<!-- 代码生成模块 -->
22+
<!-- 代码生成模块 -->
2323
<dependency>
2424
<groupId>me.zhengjie</groupId>
2525
<artifactId>eladmin-generator</artifactId>
@@ -32,19 +32,20 @@
3232
</exclusions>
3333
</dependency>
3434

35-
<!-- tools 模块包含了 common 和 logging 模块 -->
35+
<!-- tools 模块包含了 common 和 logging 模块 -->
3636
<dependency>
3737
<groupId>me.zhengjie</groupId>
3838
<artifactId>eladmin-tools</artifactId>
3939
<version>2.4</version>
4040
</dependency>
4141

42+
<!-- Spring boot websocket -->
4243
<dependency>
4344
<groupId>org.springframework.boot</groupId>
4445
<artifactId>spring-boot-starter-websocket</artifactId>
4546
</dependency>
4647

47-
<!--jwt-->
48+
<!-- jwt -->
4849
<dependency>
4950
<groupId>io.jsonwebtoken</groupId>
5051
<artifactId>jjwt-api</artifactId>
@@ -67,18 +68,19 @@
6768
<artifactId>quartz</artifactId>
6869
</dependency>
6970

71+
<!-- linux的管理 -->
7072
<dependency>
7173
<groupId>ch.ethz.ganymed</groupId>
7274
<artifactId>ganymed-ssh2</artifactId>
7375
<version>build210</version>
7476
</dependency>
75-
7677
<dependency>
7778
<groupId>com.jcraft</groupId>
7879
<artifactId>jsch</artifactId>
7980
<version>0.1.55</version>
8081
</dependency>
8182

83+
<!-- 获取系统信息 -->
8284
<dependency>
8385
<groupId>com.github.oshi</groupId>
8486
<artifactId>oshi-core</artifactId>

eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/AppController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void download(HttpServletResponse response, AppQueryCriteria criteria) th
5656
@ApiOperation(value = "查询应用")
5757
@GetMapping
5858
@PreAuthorize("@el.check('app:list')")
59-
public ResponseEntity<Object> getApps(AppQueryCriteria criteria, Pageable pageable){
59+
public ResponseEntity<Object> query(AppQueryCriteria criteria, Pageable pageable){
6060
return new ResponseEntity<>(appService.queryAll(criteria,pageable),HttpStatus.OK);
6161
}
6262

eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DatabaseController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void download(HttpServletResponse response, DatabaseQueryCriteria criteri
6464
@ApiOperation(value = "查询数据库")
6565
@GetMapping
6666
@PreAuthorize("@el.check('database:list')")
67-
public ResponseEntity<Object> getDatabases(DatabaseQueryCriteria criteria, Pageable pageable){
67+
public ResponseEntity<Object> query(DatabaseQueryCriteria criteria, Pageable pageable){
6868
return new ResponseEntity<>(databaseService.queryAll(criteria,pageable),HttpStatus.OK);
6969
}
7070

eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void download(HttpServletResponse response, DeployQueryCriteria criteria)
6666
@ApiOperation(value = "查询部署")
6767
@GetMapping
6868
@PreAuthorize("@el.check('deploy:list')")
69-
public ResponseEntity<Object> getDeploys(DeployQueryCriteria criteria, Pageable pageable){
69+
public ResponseEntity<Object> query(DeployQueryCriteria criteria, Pageable pageable){
7070
return new ResponseEntity<>(deployService.queryAll(criteria,pageable),HttpStatus.OK);
7171
}
7272

eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployHistoryController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void download(HttpServletResponse response, DeployHistoryQueryCriteria cr
5454
@ApiOperation(value = "查询部署历史")
5555
@GetMapping
5656
@PreAuthorize("@el.check('deployHistory:list')")
57-
public ResponseEntity<Object> getDeployHistorys(DeployHistoryQueryCriteria criteria, Pageable pageable){
57+
public ResponseEntity<Object> query(DeployHistoryQueryCriteria criteria, Pageable pageable){
5858
return new ResponseEntity<>(deployhistoryService.queryAll(criteria,pageable),HttpStatus.OK);
5959
}
6060

eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/ServerDeployController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void download(HttpServletResponse response, ServerDeployQueryCriteria cri
5656
@ApiOperation(value = "查询服务器")
5757
@GetMapping
5858
@PreAuthorize("@el.check('serverDeploy:list')")
59-
public ResponseEntity<Object> getServers(ServerDeployQueryCriteria criteria, Pageable pageable){
59+
public ResponseEntity<Object> query(ServerDeployQueryCriteria criteria, Pageable pageable){
6060
return new ResponseEntity<>(serverDeployService.queryAll(criteria,pageable),HttpStatus.OK);
6161
}
6262

0 commit comments

Comments
 (0)