Java .properties files as strongly typed classes

后端 未结 8 1172
小蘑菇
小蘑菇 2021-01-02 14:50

Is there way to get properties files as strongly typed classes? I guess there are code generators but doing it with annotations would be much cooler.

What I mean is;

8条回答
  •  感情败类
    2021-01-02 15:07

    I think this will solve your problem I have written on this property framework for the last year. It will provide of multiple ways to load properties, and have them strongly typed as well.

    Have a look at http://sourceforge.net/projects/jhpropertiestyp/

    It is open sourced and fully documented

    Here is my short description from SourceForge:

    JHPropertiesTyped will give the developer strongly typed properties. Easy to integrate in existing projects. Handled by a large series for property types. Gives the ability to one-line initialize properties via property IO implementations. Gives the developer the ability to create own property types and property io's. Web demo is also available, screenshots shown above. Also have a standard implementation for a web front end to manage properties, if you choose to use it.
    
    Complete documentation, tutorial, javadoc, faq etc is a available on the project webpage.
    

提交回复
热议问题