Code Monkey home page Code Monkey logo

commons-annotation-config's People

Contributors

lordrex34 avatar nik-- avatar unafraid avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

commons-annotation-config's Issues

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.