Accessing values from Alfresco's alfresco-global.properties file

前端 未结 3 367
独厮守ぢ
独厮守ぢ 2020-12-18 04:47

Lets say I create a custom property called \"test123\" inside of the alfresco-global.properties file. Is there a custom object or some other way which I can use to access it

3条回答
  •  死守一世寂寞
    2020-12-18 05:13

    All properties from the alfresco-global.properties are available as placeholders in the Spring bean definition. You can simply use:

    
    

    in your bean definition and in alfresco-global.properties:

    my.custom.option=Some string value
    

    Injecting the whole global-properties bean (as proposed above) also works but violates the principle of least knowledge.

提交回复
热议问题