fix(api): fix NamingMaintainFactory create NamingMaintainService cannot find Class
This commit is contained in:
parent
ac36a41d86
commit
221ce1237a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user