public AbstractFileStore()

in src/main/java/org/apache/rocketmq/dashboard/service/impl/AbstractFileStore.java [32:58]


    public AbstractFileStore(RMQConfigure configure, String fileName) {
        filePath = configure.getRocketMqDashboardDataPath() + File.separator + fileName;
        if (!new File(filePath).exists()) {
            // Use the default path
            InputStream inputStream = getClass().getResourceAsStream("/" + fileName);
            if (inputStream == null) {
                log.error(String.format("Can not found the file %s in Spring Boot jar", fileName));
                System.exit(1);
            } else {
                try {
                    load(inputStream);
                } catch (Exception e) {
                    log.error("fail to load file {}", filePath, e);
                } finally {
                    try {
                        inputStream.close();
                    } catch (IOException e) {
                        log.error("inputStream close exception", e);
                    }
                }
            }
        } else {
            log.info(String.format("configure file is %s", filePath));
            load();
            watch();
        }
    }