从Alfresco的alfresco-global.properties文件访问值 [英] Accessing values from Alfresco's alfresco-global.properties file

查看:223
本文介绍了从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-global.properties文件访问值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆