We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e00b0fe commit 033408dCopy full SHA for 033408d
platform-agent/src/main/java/com/flow/platform/agent/Config.java
@@ -78,9 +78,8 @@ public static int zkTimeout() {
78
*/
79
public static String getProperty(String name) {
80
String value;
81
- URL resource = Config.class.getClassLoader().getResource("application.properties");
82
if (properties == null) {
83
- try (InputStream fileInputStream = new FileInputStream(resource.getFile())) {
+ try (InputStream fileInputStream = Config.class.getResourceAsStream("/application.properties")) {
84
properties = new Properties();
85
properties.load(fileInputStream);
86
} catch (Throwable e) {
0 commit comments