This commit is contained in:
zhouxin5253@163.com 2021-01-16 20:07:08 +08:00
parent 21281d05fe
commit 221d7fc4e1
3 changed files with 5 additions and 10 deletions

View File

@ -21,7 +21,7 @@ import java.util.List;
@Configuration
@EnableConfigurationProperties(TeambitionProperties.class)
public class TeambitionAutoConfig implements ApplicationContextAware {
public class TeambitionAutoConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(TeambitionAutoConfig.class);
@Autowired
@ -70,8 +70,5 @@ public class TeambitionAutoConfig implements ApplicationContextAware {
return teambitionClient;
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
TeambitionFileSystemStore.setApplicationContext(applicationContext);
}
}

View File

@ -35,6 +35,7 @@ public class TeambitionClientService {
public TeambitionClientService(TeambitionClient teambitionClient) {
this.client = teambitionClient;
TeambitionFileSystemStore.setBean(this);
}
public List<TFile> getTFiles(String nodeId) {

View File

@ -22,16 +22,13 @@ import java.util.List;
public class TeambitionFileSystemStore implements IWebdavStore {
private static final Logger LOGGER = LoggerFactory.getLogger(TeambitionFileSystemStore.class);
private static ApplicationContext applicationContext;
private static TeambitionClientService teambitionClientService;
public TeambitionFileSystemStore(File file) {
}
public static void setApplicationContext(ApplicationContext applicationContext) {
TeambitionFileSystemStore.applicationContext = applicationContext;
TeambitionFileSystemStore.teambitionClientService = applicationContext.getBean(TeambitionClientService.class);
public static void setBean(TeambitionClientService teambitionClientService) {
TeambitionFileSystemStore.teambitionClientService = teambitionClientService;
}