From 170a0d7d0a772ef6b8498b5b31dfeafe80f2fc4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E7=A6=B9=E5=85=89?= Date: Sat, 15 Jun 2019 12:52:54 +0800 Subject: [PATCH] better --- .../nacos/config/server/service/DynamicDataSource.java | 4 ---- .../config/server/service/LocalDataSourceServiceImpl.java | 4 ---- 2 files changed, 8 deletions(-) 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();