Skip to content

Commit 34c9026

Browse files
committed
check config folder too
1 parent 0751254 commit 34c9026

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

control/src/main/kotlin/spp/probe/ProbeConfiguration.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ object ProbeConfiguration {
3535
rawProperties = mapper.readValue(FileInputStream(localFile), MutableMap::class.java)
3636
as Map<String, Map<String, Any>>?
3737
}
38+
39+
localFile = File(
40+
File(
41+
Class.forName(
42+
"org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader"
43+
).protectionDomain.codeSource.location.file
44+
).parentFile, "config" + File.separatorChar + "spp-probe.yml"
45+
)
46+
if (localFile.exists()) {
47+
rawProperties = mapper.readValue(FileInputStream(localFile), MutableMap::class.java)
48+
as Map<String, Map<String, Any>>?
49+
}
3850
} else {
3951
//ran through intellij?
4052
localFile = File(

0 commit comments

Comments
 (0)