首页 > 解决方案 > How to override a value from slingshot.properties in Alfresco?

问题描述

I am using alfresco 6. I have created custom xml and a custom properties file under web-extension folder. My changes are not getting reflected. What's the correct way to do it?

标签: alfrescoalfresco-sharealfresco-enterprise

解决方案


您必须将自定义弹弓属性文件放在 web-extension\messages 文件夹下,并且您需要创建并放置自定义弹弓上下文文件以导入自定义弹弓属性文件。

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
  <bean id="org_alfresco_module_custom_propertyBootstrap" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.web-extension.messages.customslingshot</value>
         </list>
      </property>
   </bean>   
</beans>

将其另存为web-extension 文件夹下的custom-slingshot-application-context.xml文件。

在 web-extension\messages 下创建customlingshot.properties并覆盖 customlingshot.properties 文件中的消息。

希望这可以帮助

注意:这适用于 Alfresco 5.x,它应该适用于 Alfresco 6.0。如果您遇到任何问题,请告诉我。


推荐阅读