Closed p4535992 closed 7 years ago
The support for share-global.properties is primarily intended to allow you to use the ${}
syntax to directly inject property values into your Spring beans. You can also reference the bean as the complete Properties object just as in your first example. You can reference the same global properties from as many extension modules as you like - when enabled (which is the default) the bean will be available globally.
It does not make much sense to use the ResourceBundleBootstrapComponent to load the share-global.properties though - the ResourceBundleBootstrapComponent is meant for loading I18n data while the share-global.properties files are configuration files. Technically you could do that, and doing so would allow you to reference property values from JavaScript-backed web scripts via the message
root object.
ty very much, just what i want to know
Hi, a question about the use of the share-global-properties on Share-Tier, the properties on the file tomcat/shared/classes/share-global.properties, i can read them like i read the alfresco-global.properties, with a bean right? for example with this piece of code:
Now i use multiple amp_share with custom surf extensions on my project, my question is "can i use the same share-global-properties in my other amps surf extensions; i just need to call the properties file with the same id of the bean "global-properties" like in the code i show before?
i'm asking because i'm not sure if these approach can work with the surf extensions in the specific if i can use the class ResourceBundleBootstrapComponent for retrieve these properties:
or i can use the syntax ${....} like for the global.properties in the services-context.xml in my extensions xml files?
or both the cases are wrong usage?