commons-annotation-config's People
commons-annotation-config's Issues
Missing README file
Yeah, I should make one day something like that.
Override.properties is hardcodded.
Here is a line of reference: https://github.com/lordrex34/commons-annotation-config/blob/master/src/main/java/com/github/lordrex34/config/ConfigManager.java#L108
All config annotations allow you to change the path of the config, pointing to a folder other than "config", also you can change the file type as well, from ".properties" to something else. The case here is that no matter what you do with those annotations there, this engine will ALWAYS search for ./config/override.properties even if you are using some other folder and extensions for the default configs. This is a huge design flaw which is binding you to use the default settings - place everything in ./config/*.properties.
I suggest 2 ways to fix this issue:
- Allow individual override files for every config class, for example:
@ConfigClass(fileName = "general", pathNames="settings", fileExtension="")
to@ConfigClass(fileName = "general", pathNames="settings", overridePathNames={ "settings", "override.properties" })
- Instead of the boolean:
ConfigManager#isOverrideSystemAllowed()
, allow it to be a path, if set to non-null, the override system will be allowed and it will take the overriding properties file from the spefied path.
@ConfigField annotation defaultValueSupplier feature support request
Hello,
As title says, i need support for providing default value that has to be computed first, in my case random generated base64 text.
I can suggest small interface like
public interface IConfigDefaultValueSupplier<T>
{
Supplier<T> supply();
}
Added onto the ConfigField annotation used instead of value variable if not null
Reloading override.properties does not work.
When reloading configuration, the override.properties file is not read.
[20:37:15] INFO Loaded 0 overridden properti(es).
Compared to when config is initially loaded:
[20:28:30] INFO Loaded 17 overridden properti(es).
It appears that since override.properties is passed as InputStream, once the stream is read on the first pass, its no longer valid on consecutive passes. Maybe a supplier of the InputStream should be passed instead?
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.