diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/DynamicDataSource.java b/config/src/main/java/com/alibaba/nacos/config/server/service/DynamicDataSource.java index 78f038d22..58109402e 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/DynamicDataSource.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/DynamicDataSource.java @@ -16,7 +16,6 @@ package com.alibaba.nacos.config.server.service; import com.alibaba.nacos.config.server.utils.PropertyUtil; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Component; @@ -31,9 +30,6 @@ import static com.alibaba.nacos.core.utils.SystemUtils.STANDALONE_MODE; @Component public class DynamicDataSource implements ApplicationContextAware { - @Autowired - private PropertyUtil propertyUtil; - private ApplicationContext applicationContext; public void setApplicationContext(ApplicationContext applicationContext) { diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/LocalDataSourceServiceImpl.java b/config/src/main/java/com/alibaba/nacos/config/server/service/LocalDataSourceServiceImpl.java index c930a3f1d..31d6dca77 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/LocalDataSourceServiceImpl.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/LocalDataSourceServiceImpl.java @@ -22,7 +22,6 @@ import com.alibaba.nacos.config.server.utils.StringUtils; import org.apache.commons.dbcp.BasicDataSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.stereotype.Service; @@ -62,9 +61,6 @@ public class LocalDataSourceServiceImpl implements DataSourceService { private JdbcTemplate jt; private TransactionTemplate tjt; - @Autowired - private PropertyUtil propertyUtil; - @PostConstruct public void init() { BasicDataSource ds = new BasicDataSource();