本文介绍了从Alfresco的alfresco-global.properties文件访问值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以说我在alfresco-global.properties文件中创建了一个名为 test123的自定义属性。是否可以在Alfresco的Java bean中使用自定义对象或其他方法来访问其值?
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 its value inside of a Java bean in Alfresco?
推荐答案Spring bean被称为全局属性,它是java.util.Properties类型
The Spring bean is called "global-properties" and it's a java.util.Properties type
因此您可以像这样注入它:
So you can inject it like that:
<property name="properties"> <ref bean="global-properties"/> </property并将类型为java.util.Properties的properties属性添加到你的豆子
and add a properties property of type java.util.Properties to your bean
更多推荐
从Alfresco的alfresco
发布评论