update to spring-boot-2.1.8.RELEASE & spring-cloud-Greenwich.SR3
This commit is contained in:
@@ -3,7 +3,7 @@ spring:
|
||||
url: jdbc:mysql://${zlt.datasource.ip}:3306/user-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
|
||||
username: ${zlt.datasource.username}
|
||||
password: ${zlt.datasource.password}
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:/mapper/*Mapper.xml
|
||||
|
||||
@@ -3,7 +3,7 @@ spring:
|
||||
url: jdbc:mysql://${zlt.datasource.ip}:3306/file_center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
|
||||
username: ${zlt.datasource.username}
|
||||
password: ${zlt.datasource.password}
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:/mapper/*Mapper.xml
|
||||
|
||||
+4
-4
@@ -52,8 +52,8 @@ public class IndexController {
|
||||
/**
|
||||
* 索引明细
|
||||
*/
|
||||
@GetMapping("/index/{indexName}")
|
||||
public Result<Map<String, Object>> showIndex(@PathVariable String indexName) {
|
||||
@GetMapping("/index")
|
||||
public Result<Map<String, Object>> showIndex(String indexName) {
|
||||
Map<String, Object> result = indexService.show(indexName);
|
||||
return Result.succeed(result);
|
||||
}
|
||||
@@ -61,8 +61,8 @@ public class IndexController {
|
||||
/**
|
||||
* 删除索引
|
||||
*/
|
||||
@DeleteMapping("/index/{indexName}")
|
||||
public Result deleteIndex(@PathVariable String indexName) {
|
||||
@DeleteMapping("/index")
|
||||
public Result deleteIndex(String indexName) {
|
||||
indexService.delete(indexName);
|
||||
return Result.succeed("操作成功");
|
||||
}
|
||||
|
||||
+8
-2
@@ -1,6 +1,7 @@
|
||||
package com.central.admin.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
import com.central.admin.model.IndexDto;
|
||||
import com.central.admin.model.IndexVo;
|
||||
@@ -115,7 +116,12 @@ public class IndexServiceImpl implements IIndexService {
|
||||
|
||||
IndexMetaData indexMetaData = stat.get(indexName);
|
||||
//获取settings数据
|
||||
Map<String, String> settMap = indexMetaData.getSettings().getAsMap();
|
||||
String settingsStr = indexMetaData.getSettings().toString();
|
||||
Object settingsObj = null;
|
||||
if (StrUtil.isNotEmpty(settingsStr)) {
|
||||
settingsObj = JSONObject.parse(settingsStr);
|
||||
}
|
||||
|
||||
ImmutableOpenMap<String, MappingMetaData> mappOpenMap = indexMetaData.getMappings();
|
||||
ImmutableOpenMap<String, AliasMetaData> aliasesOpenMap = indexMetaData.getAliases();
|
||||
Map<String, Object> result = new HashMap<>(1);
|
||||
@@ -123,7 +129,7 @@ public class IndexServiceImpl implements IIndexService {
|
||||
Map<String, Object> mappMap = new HashMap<>(mappOpenMap.size());
|
||||
Map<String, Object> aliasesMap = new HashMap<>(aliasesOpenMap.size());
|
||||
indexMap.put("aliases", aliasesMap);
|
||||
indexMap.put("settings", settMap);
|
||||
indexMap.put("settings", settingsObj);
|
||||
indexMap.put("mappings", mappMap);
|
||||
result.put(indexName, indexMap);
|
||||
//获取mappings数据
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import org.elasticsearch.search.aggregations.Aggregations;
|
||||
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
|
||||
import org.elasticsearch.search.aggregations.bucket.histogram.ExtendedBounds;
|
||||
import org.elasticsearch.search.aggregations.bucket.histogram.InternalDateHistogram;
|
||||
import org.elasticsearch.search.aggregations.bucket.range.date.InternalDateRange;
|
||||
import org.elasticsearch.search.aggregations.bucket.range.InternalDateRange;
|
||||
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
|
||||
import org.elasticsearch.search.aggregations.metrics.cardinality.Cardinality;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
@@ -2,7 +2,10 @@ spring:
|
||||
data:
|
||||
elasticsearch:
|
||||
cluster-name: ${zlt.elasticsearch.cluster-name}
|
||||
cluster-nodes: ${zlt.elasticsearch.cluster-nodes}
|
||||
cluster-nodes: ${zlt.elasticsearch.cluster-nodes}:9300
|
||||
elasticsearch:
|
||||
rest:
|
||||
uris: ${zlt.elasticsearch.cluster-nodes}:9200
|
||||
|
||||
zlt:
|
||||
indices:
|
||||
|
||||
@@ -3,7 +3,7 @@ spring:
|
||||
url: jdbc:mysql://${zlt.datasource.ip}:3306/user-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
|
||||
username: ${zlt.datasource.username}
|
||||
password: ${zlt.datasource.password}
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:/mapper/*Mapper.xml
|
||||
|
||||
Reference in New Issue
Block a user