happyfish100 / happyfish100/fastdfs-client-java

建议增强读取配置文件功能。

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.6k
Forks
891
PR merge metrics
No merged PRs in 30d

Description

目前,只能读取到配置文件的本地磁盘路径再加载配置文件,建议增加能够读取项目src下的配置文件。可参考spring-core中io部分的读取方式。本人冒昧的简单的改了下IniFileReader类的loadFromFile方法,如下:

//fReader = new FileReader(conf_filename);
ResourceLoader resourceLoader = new DefaultResourceLoader();
InputStream in = resourceLoader.getResource(conf_filename).getInputStream();
buffReader = new BufferedReader(new InputStreamReader(in));

注:引用了spring的spring-core包。

谢谢!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the IniFileReader.loadFromFile method mentioned in the issue and inspect how it currently loads a local disk path. Compare that behavior with the suggested spring-core ResourceLoader approach. Done means configuration files under the project src path can be loaded while existing local-path loading continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.