public static String readFileContent()

in src/main/java/com/aliyuncs/kms/secretsmanager/client/utils/ConfigUtils.java [55:73]


    public static String readFileContent(String filePath) {
        File file = getFileByPath(filePath);
        if (file == null || !file.exists()) {
            try (InputStream in = ConfigUtils.class.getClassLoader().getResourceAsStream(filePath);
                 BufferedReader reader = in == null ? null : new BufferedReader(new InputStreamReader(in))
            ) {
                return readContent(reader);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        } else {
            try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
                return readContent(reader);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

    }