fix(api): fix NamingMaintainFactory create NamingMaintainService cannot find Class

This commit is contained in:
chuntaojun 2019-05-09 10:22:16 +08:00
parent ac36a41d86
commit 221ce1237a

View File

@ -29,7 +29,7 @@ public class NamingMaintainFactory {
public static NamingMaintainService createMaintainService(String serverList) throws NacosException {
try {
Class<?> driverImplClass = Class.forName("com.alibaba.nacos.client.naming.NacosMaintainService");
Class<?> driverImplClass = Class.forName("com.alibaba.nacos.client.naming.NacosNamingMaintainService");
Constructor constructor = driverImplClass.getConstructor(String.class);
NamingMaintainService vendorImpl = (NamingMaintainService)constructor.newInstance(serverList);
return vendorImpl;
@ -40,7 +40,7 @@ public class NamingMaintainFactory {
public static NamingMaintainService createMaintainService(Properties properties) throws NacosException {
try {
Class<?> driverImplClass = Class.forName("com.alibaba.nacos.client.naming.NacosMaintainService");
Class<?> driverImplClass = Class.forName("com.alibaba.nacos.client.naming.NacosNamingMaintainService");
Constructor constructor = driverImplClass.getConstructor(Properties.class);
NamingMaintainService vendorImpl = (NamingMaintainService)constructor.newInstance(properties);
return vendorImpl;