Comments (4)
I can see how that'd be useful, but unfortunately in the current implementation it just is not possible to do it as simply as you're hoping to, because the kind of path you get from getResource(...).getURI().getRawPath()
is not a real file path and can't be used as such.
I think it would not be too hard for us to change the implementation to support something like this, but it will probably have to wait until after the upcoming 5.0.0 release. In the meantime, the only workaround I can think of would be to create a temporary file— I mean, a real file on the filesystem— copy the data from your classpath file into that, and use that.
from java-server-sdk.
Yeah, that makes sense, using path that points to inside of a jar is tricky.
What about InputStream or Resource?
Workaround you suggest won't work in our CI setup :/
from java-server-sdk.
I think if the abstraction was to support both files and classpath resources, it would probably be represented as a URI. Of course this would mean that the auto-update feature would not always work, because that's based on a filesystem watcher.
from java-server-sdk.
This feature made it into today's 5.0.0 release. The API we settled on is that you simply call classpathResources
instead of (or in addition to) filePaths
. Unlike Spring's ResourceLoader.getResource()
, the string parameter does not use a "classpath:" prefix.
from java-server-sdk.
Related Issues (20)
- Launch Darkly Metrics conflating Version numbers. HOT 3
- Getting numerous Error posting diagnostic event (giving up permanently): HTTP error 401 (invalid SDK key) HOT 2
- Synk reports the low version of okHttp3 dependency HOT 3
- Vulnerability in snakeyaml HOT 3
- LaunchDarkly Client initialing failed even add LaunchDarkly Certificate to java key store. HOT 9
- Add shaded libraries as dependencies to `-thin` jar HOT 2
- `isInitialized` & `dataStore.isInitialized()` HOT 3
- Please provide ability to `LDClient` in non-blocking manner HOT 4
- fat jar brings in duplicate copy of `launchdarkly-logging` HOT 3
- Allow lazily computed defaultValues in LDClient to improve code readability HOT 6
- java-server-sdk is vulnerable to CVE-2022-1471 RCE HOT 3
- Builder object is not exist in V6 but is taken as an example in the docs HOT 6
- Evaluation can throw when the same segment is used in multiple rules within a single flag HOT 6
- StreamClosedByServerException: Stream closed by server HOT 13
- Vulnerability CVE-2022-1471 is introduced via SnakeYaml 1.32. Upgrading to 2.0 should fix it. HOT 3
- Have a robust in memory datastore fallback when the persistent data store connection is not working HOT 2
- update to guava 32.0.0 to resolve CVE-2023-2976 HOT 6
- ApiException.getMessage throws NullPointerException when IOException occurs HOT 1
- Stream continuously reset HOT 2
- Support for use of java-server-sdk library in GraalVM native image applications HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-server-sdk.