fix bug
This commit is contained in:
parent
21281d05fe
commit
221d7fc4e1
|
@ -21,7 +21,7 @@ import java.util.List;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableConfigurationProperties(TeambitionProperties.class)
|
@EnableConfigurationProperties(TeambitionProperties.class)
|
||||||
public class TeambitionAutoConfig implements ApplicationContextAware {
|
public class TeambitionAutoConfig {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(TeambitionAutoConfig.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(TeambitionAutoConfig.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -70,8 +70,5 @@ public class TeambitionAutoConfig implements ApplicationContextAware {
|
||||||
return teambitionClient;
|
return teambitionClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
|
||||||
TeambitionFileSystemStore.setApplicationContext(applicationContext);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ public class TeambitionClientService {
|
||||||
|
|
||||||
public TeambitionClientService(TeambitionClient teambitionClient) {
|
public TeambitionClientService(TeambitionClient teambitionClient) {
|
||||||
this.client = teambitionClient;
|
this.client = teambitionClient;
|
||||||
|
TeambitionFileSystemStore.setBean(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TFile> getTFiles(String nodeId) {
|
public List<TFile> getTFiles(String nodeId) {
|
||||||
|
|
|
@ -22,16 +22,13 @@ import java.util.List;
|
||||||
public class TeambitionFileSystemStore implements IWebdavStore {
|
public class TeambitionFileSystemStore implements IWebdavStore {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(TeambitionFileSystemStore.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(TeambitionFileSystemStore.class);
|
||||||
|
|
||||||
private static ApplicationContext applicationContext;
|
|
||||||
private static TeambitionClientService teambitionClientService;
|
private static TeambitionClientService teambitionClientService;
|
||||||
|
|
||||||
|
|
||||||
public TeambitionFileSystemStore(File file) {
|
public TeambitionFileSystemStore(File file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setApplicationContext(ApplicationContext applicationContext) {
|
public static void setBean(TeambitionClientService teambitionClientService) {
|
||||||
TeambitionFileSystemStore.applicationContext = applicationContext;
|
TeambitionFileSystemStore.teambitionClientService = teambitionClientService;
|
||||||
TeambitionFileSystemStore.teambitionClientService = applicationContext.getBean(TeambitionClientService.class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue