Skip to content

Commit

Permalink
Making master.xml spring config file to bundle config files and avoid…
Browse files Browse the repository at this point in the history
… wildcard include, breaking out minter config and making it configurable with system property fcrepo.minter.config
  • Loading branch information
escowles committed May 14, 2014
1 parent 71196e3 commit 48327b9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
17 changes: 17 additions & 0 deletions fcrepo-webapp/src/main/resources/spring/master.xml
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

<!-- Master context for fcrepo4. -->

<import resource="classpath:/spring/repo.xml"/>
<import resource="classpath:/spring/rest.xml"/>
<import resource="${fcrepo.minter.config:classpath:/spring/minter.xml}"/>
<import resource="classpath:/spring/eventing.xml"/>
<import resource="classpath:/spring/jms.xml"/>
<import resource="classpath:/spring/generator.xml"/>
<import resource="classpath:/spring/transactions.xml"/>

</beans>
12 changes: 12 additions & 0 deletions fcrepo-webapp/src/main/resources/spring/minter.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.springframework.org/schema/c"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

<!-- Mints PIDs-->
<bean class="org.fcrepo.kernel.identifiers.UUIDPathMinter"
c:length="${fcrepo.uuid.path.length:2}"
c:count="${fcrepo.uuid.path.count:4}"/>

</beans>
5 changes: 0 additions & 5 deletions fcrepo-webapp/src/main/resources/spring/rest.xml
Expand Up @@ -16,11 +16,6 @@

<context:annotation-config/>

<!-- Mints PIDs-->
<bean class="org.fcrepo.kernel.identifiers.UUIDPathMinter"
c:length="${fcrepo.uuid.path.length:2}"
c:count="${fcrepo.uuid.path.count:4}"/>

<bean class="org.fcrepo.http.commons.session.SessionFactory"/>

<!-- Identifier translation chain -->
Expand Down
2 changes: 1 addition & 1 deletion fcrepo-webapp/src/main/webapp/WEB-INF/web.xml
Expand Up @@ -9,7 +9,7 @@

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/classes/spring/*.xml</param-value>
<param-value>WEB-INF/classes/spring/master.xml</param-value>
</context-param>

<listener>
Expand Down

0 comments on commit 48327b9

Please sign in to comment.