fix bug
This commit is contained in:
parent
21281d05fe
commit
221d7fc4e1
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public class TeambitionClientService {
|
|||
|
||||
public TeambitionClientService(TeambitionClient teambitionClient) {
|
||||
this.client = teambitionClient;
|
||||
TeambitionFileSystemStore.setBean(this);
|
||||
}
|
||||
|
||||
public List<TFile> getTFiles(String nodeId) {
|
||||
|
|
|
@ -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…
Reference in New Issue