better
This commit is contained in:
parent
ebeacb0e31
commit
170a0d7d0a
@ -16,7 +16,6 @@
|
|||||||
package com.alibaba.nacos.config.server.service;
|
package com.alibaba.nacos.config.server.service;
|
||||||
|
|
||||||
import com.alibaba.nacos.config.server.utils.PropertyUtil;
|
import com.alibaba.nacos.config.server.utils.PropertyUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.ApplicationContextAware;
|
import org.springframework.context.ApplicationContextAware;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@ -31,9 +30,6 @@ import static com.alibaba.nacos.core.utils.SystemUtils.STANDALONE_MODE;
|
|||||||
@Component
|
@Component
|
||||||
public class DynamicDataSource implements ApplicationContextAware {
|
public class DynamicDataSource implements ApplicationContextAware {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private PropertyUtil propertyUtil;
|
|
||||||
|
|
||||||
private ApplicationContext applicationContext;
|
private ApplicationContext applicationContext;
|
||||||
|
|
||||||
public void setApplicationContext(ApplicationContext applicationContext) {
|
public void setApplicationContext(ApplicationContext applicationContext) {
|
||||||
|
@ -22,7 +22,6 @@ import com.alibaba.nacos.config.server.utils.StringUtils;
|
|||||||
import org.apache.commons.dbcp.BasicDataSource;
|
import org.apache.commons.dbcp.BasicDataSource;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -62,9 +61,6 @@ public class LocalDataSourceServiceImpl implements DataSourceService {
|
|||||||
private JdbcTemplate jt;
|
private JdbcTemplate jt;
|
||||||
private TransactionTemplate tjt;
|
private TransactionTemplate tjt;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private PropertyUtil propertyUtil;
|
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
BasicDataSource ds = new BasicDataSource();
|
BasicDataSource ds = new BasicDataSource();
|
||||||
|
Loading…
Reference in New Issue
Block a user