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

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

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