本文介绍了从 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 被称为global-properties",它是一个 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并向您的 bean 添加一个 java.util.Properties 类型的 properties 属性
and add a properties property of type java.util.Properties to your bean
更多推荐
从 Alfresco 的 alfresco
发布评论