commit
9651284ad1
@ -1,6 +1,5 @@
|
||||
# spring
|
||||
|
||||
server.contextPath=/nacos
|
||||
server.servlet.contextPath=/nacos
|
||||
server.port=8848
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class HealthCheckProcessorDelegate implements HealthCheckProcessor {
|
||||
String type = task.getCluster().getHealthChecker().getType();
|
||||
HealthCheckProcessor processor = healthCheckProcessorMap.get(type);
|
||||
if(processor == null){
|
||||
processor = healthCheckProcessorMap.get("none");
|
||||
processor = healthCheckProcessorMap.get(NoneHealthCheckProcessor.TYPE);
|
||||
}
|
||||
|
||||
processor.process(task);
|
||||
|
@ -47,6 +47,8 @@ import static com.alibaba.nacos.naming.misc.Loggers.SRV_LOG;
|
||||
@Component
|
||||
public class HttpHealthCheckProcessor implements HealthCheckProcessor {
|
||||
|
||||
public static final String TYPE = "HTTP";
|
||||
|
||||
@Autowired
|
||||
private SwitchDomain switchDomain;
|
||||
|
||||
@ -79,7 +81,7 @@ public class HttpHealthCheckProcessor implements HealthCheckProcessor {
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "HTTP";
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -45,6 +45,8 @@ import static com.alibaba.nacos.naming.misc.Loggers.SRV_LOG;
|
||||
@Component
|
||||
public class MysqlHealthCheckProcessor implements HealthCheckProcessor {
|
||||
|
||||
public static final String TYPE = "MYSQL";
|
||||
|
||||
@Autowired
|
||||
private HealthCheckCommon healthCheckCommon;
|
||||
|
||||
@ -83,7 +85,7 @@ public class MysqlHealthCheckProcessor implements HealthCheckProcessor {
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "MYSQL";
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -26,12 +26,14 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class NoneHealthCheckProcessor implements HealthCheckProcessor {
|
||||
|
||||
public static final String TYPE = "NONE";
|
||||
|
||||
@Override
|
||||
public void process(HealthCheckTask task) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "NONE";
|
||||
return TYPE;
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,8 @@ import static com.alibaba.nacos.naming.misc.Loggers.SRV_LOG;
|
||||
@Component
|
||||
public class TcpSuperSenseProcessor implements HealthCheckProcessor, Runnable {
|
||||
|
||||
public static final String TYPE = "TCP";
|
||||
|
||||
@Autowired
|
||||
private HealthCheckCommon healthCheckCommon;
|
||||
|
||||
@ -420,6 +422,6 @@ public class TcpSuperSenseProcessor implements HealthCheckProcessor, Runnable {
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "TCP";
|
||||
return TYPE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user