Browse Source

fix bug

main
zhouxin5253@163.com 4 years ago
parent
commit
221d7fc4e1
  1. 7
      src/main/java/com/github/zxbu/webdavteambition/config/TeambitionAutoConfig.java
  2. 1
      src/main/java/com/github/zxbu/webdavteambition/store/TeambitionClientService.java
  3. 7
      src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java

7
src/main/java/com/github/zxbu/webdavteambition/config/TeambitionAutoConfig.java

@ -21,7 +21,7 @@ import java.util.List; @@ -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 { @@ -70,8 +70,5 @@ public class TeambitionAutoConfig implements ApplicationContextAware {
return teambitionClient;
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
TeambitionFileSystemStore.setApplicationContext(applicationContext);
}
}

1
src/main/java/com/github/zxbu/webdavteambition/store/TeambitionClientService.java

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

7
src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java

@ -22,16 +22,13 @@ import java.util.List; @@ -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;
}

Loading…
Cancel
Save