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 {
|
public static NamingMaintainService createMaintainService(String serverList) throws NacosException {
|
||||||
try {
|
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);
|
Constructor constructor = driverImplClass.getConstructor(String.class);
|
||||||
NamingMaintainService vendorImpl = (NamingMaintainService)constructor.newInstance(serverList);
|
NamingMaintainService vendorImpl = (NamingMaintainService)constructor.newInstance(serverList);
|
||||||
return vendorImpl;
|
return vendorImpl;
|
||||||
@ -40,7 +40,7 @@ public class NamingMaintainFactory {
|
|||||||
|
|
||||||
public static NamingMaintainService createMaintainService(Properties properties) throws NacosException {
|
public static NamingMaintainService createMaintainService(Properties properties) throws NacosException {
|
||||||
try {
|
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);
|
Constructor constructor = driverImplClass.getConstructor(Properties.class);
|
||||||
NamingMaintainService vendorImpl = (NamingMaintainService)constructor.newInstance(properties);
|
NamingMaintainService vendorImpl = (NamingMaintainService)constructor.newInstance(properties);
|
||||||
return vendorImpl;
|
return vendorImpl;
|
||||||
|
Loading…
Reference in New Issue
Block a user