alibaba / alibaba/spring-cloud-alibaba
FileNotFoundException throws when rules is provided by local resources in classpath and executed in command line
- Dominant language
- Java
- Stars
- 29.2k
- Forks
- 8.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 12
Description
Component: Sentinel
Description:
If the rules were configured in local file in classpath and executed the built jar in command line, FileNotFoundException throws, says,
class path resource [sentinel.json] cannot be resolved to absolute file path because it does not reside in the file system:jar:file:/D:/projects/a/b/c/blabal.jar!/BOOT-INF/classes!/sentinel.json
Investigation:
class: FileDataSourceProperties
method:preCheck
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with FileDataSourceProperties.preCheck and reproduce the issue by packaging the application and running the built jar from the command line with sentinel.json supplied as a classpath resource. Trace how the resource is resolved in the packaged jar. Done means the classpath rules resource loads without FileNotFoundException in that execution mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100