⬆️ Upgrading dependencies. close #I4N5U6 up springbootadmin 2.5.5

This commit is contained in:
lbw 2021-12-20 13:31:06 +08:00
parent cb1a6c6948
commit 6326781111
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,29 @@
package com.pig4cloud.pig.monitor.converter;
import de.codecentric.boot.admin.server.cloud.discovery.DefaultServiceInstanceConverter;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.context.annotation.Configuration;
import java.util.Map;
import java.util.stream.Collectors;
import static java.util.Collections.emptyMap;
/**
* 针对 nacos 2.x 服务注册处理
*
* @author lengleng
* @date 2021/12/20
*/
@Configuration(proxyBeanMethods = false)
public class NacosServiceInstanceConverter extends DefaultServiceInstanceConverter {
@Override
protected Map<String, String> getMetadata(ServiceInstance instance) {
return (instance.getMetadata() != null)
? instance.getMetadata().entrySet().stream().filter((e) -> e.getKey() != null && e.getValue() != null)
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))
: emptyMap();
}
}

View File

@ -33,7 +33,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring-boot-admin.version>2.5.4</spring-boot-admin.version>
<spring-boot-admin.version>2.5.5</spring-boot-admin.version>
<hutool.version>5.7.16</hutool.version>
<dynamic-ds.version>3.4.1</dynamic-ds.version>
<captcha.version>2.2.1</captcha.version>