Using Google Guice to inject java properties

前端 未结 5 1043
灰色年华
灰色年华 2021-02-02 14:24

I want to use google guice to make properties available in all classes of my application. I defined a Module which loads and binds the properties file Test.properties.<

5条回答
  •  故里飘歌
    2021-02-02 14:57

    Library "Governator" provide a configuration mapping feature for guice injection. The approach is different, but load from properties files is available.

    https://github.com/Netflix/governator/wiki/Configuration-Mapping

提交回复
热议问题