mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
REPO-2724 Add repository.properties to ServerDescriptor configuration
This commit is contained in:
@@ -62,15 +62,17 @@ public class ServerDescriptorDAOImpl implements DescriptorDAO
|
|||||||
/**
|
/**
|
||||||
* Sets the server descriptor from a resource file.
|
* Sets the server descriptor from a resource file.
|
||||||
*
|
*
|
||||||
* @param descriptorResource
|
* @param locations
|
||||||
* resource containing server descriptor meta-data
|
* resources containing server descriptor meta-data
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* Signals that an I/O exception has occurred.
|
* Signals that an I/O exception has occurred.
|
||||||
*/
|
*/
|
||||||
public void setResource(final Resource descriptorResource) throws IOException
|
public void setResource(final Resource[] locations) throws IOException
|
||||||
{
|
{
|
||||||
this.serverProperties = new Properties();
|
this.serverProperties = new Properties();
|
||||||
InputStream is = descriptorResource.getInputStream();
|
for (int i=0; i< locations.length; i++)
|
||||||
|
{
|
||||||
|
InputStream is = locations[i].getInputStream();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.serverProperties.load(is);
|
this.serverProperties.load(is);
|
||||||
@@ -80,6 +82,7 @@ public class ServerDescriptorDAOImpl implements DescriptorDAO
|
|||||||
if (is != null) try { is.close(); } catch (IOException e) {}
|
if (is != null) try { is.close(); } catch (IOException e) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Descriptor getDescriptor()
|
public Descriptor getDescriptor()
|
||||||
{
|
{
|
||||||
|
@@ -859,7 +859,10 @@
|
|||||||
<value>${repository.name}</value>
|
<value>${repository.name}</value>
|
||||||
</property>
|
</property>
|
||||||
<property name="resource">
|
<property name="resource">
|
||||||
|
<list>
|
||||||
<value>classpath:alfresco/version.properties</value>
|
<value>classpath:alfresco/version.properties</value>
|
||||||
|
<value>classpath:alfresco/repository.properties</value>
|
||||||
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user