Skip to content
Snippets Groups Projects
Commit 269c07d7 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Refactoring of the spring-configuration-files.

parent d718fc15
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,8 @@ Any value defined here will override the pom.xml file value but is only applicab ...@@ -23,6 +23,8 @@ Any value defined here will override the pom.xml file value but is only applicab
<config-files> <config-files>
<config-file>src/main/webapp/WEB-INF/spring-config.xml</config-file> <config-file>src/main/webapp/WEB-INF/spring-config.xml</config-file>
<config-file>src/main/webapp/WEB-INF/spring-security-taglib.xml</config-file> <config-file>src/main/webapp/WEB-INF/spring-security-taglib.xml</config-file>
<config-file>src/main/webapp/WEB-INF/spring-database-config.xml</config-file>
<config-file>src/main/webapp/WEB-INF/spring-bean-config.xml</config-file>
</config-files> </config-files>
<config-file-groups/> <config-file-groups/>
</spring-data> </spring-data>
......
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
xmlns:jdbc="http://www.springframework.org/schema/jdbc" http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
xmlns:util="http://www.springframework.org/schema/util">
<!-- The database and the transaction manager. -->
<bean id="userDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="url" value="jdbc:derby:user;create=true" />
</bean>
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="userDataSource"/>
</bean>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true"/>
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<!-- ensure that the above transactional advice runs for any execution
of an operation defined by the UserManager interface -->
<aop:config>
<aop:pointcut id="userManagerOperation" expression="execution(* kieker.webgui.common.IUserManagerFacade.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="userManagerOperation"/>
</aop:config>
<jdbc:initialize-database ignore-failures="ALL" data-source="userDataSource">
<jdbc:script location="classpath:sql/tables.sql"/>
<jdbc:script location="classpath:sql/test-data.sql"/>
</jdbc:initialize-database>
<!-- As there is no view scope available in Spring, we have to use a custom defined scope for this purpose. -->
<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
<property name="scopes">
<map>
<entry key="view">
<bean class="kieker.webgui.common.util.ViewScope"/>
</entry>
</map>
</property>
</bean>
<!-- This is for the properties-files. -->
<bean id="globalPropertiesPlaceholder" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:global.properties</value>
</list>
</property>
</bean>
<!-- The singleton scoped beans. --> <!-- The singleton scoped beans. -->
<bean id="pluginFinder" class="kieker.webgui.common.util.PluginFinder" /> <bean id="pluginFinder" class="kieker.webgui.common.util.PluginFinder" />
...@@ -172,4 +114,4 @@ ...@@ -172,4 +114,4 @@
<!-- The enums. --> <!-- The enums. -->
<util:constant id="ROLE_USER" static-field="kieker.webgui.common.Role.ROLE_USER"/> <util:constant id="ROLE_USER" static-field="kieker.webgui.common.Role.ROLE_USER"/>
<util:constant id="ROLE_ADMIN" static-field="kieker.webgui.common.Role.ROLE_ADMIN"/> <util:constant id="ROLE_ADMIN" static-field="kieker.webgui.common.Role.ROLE_ADMIN"/>
</beans> </beans>
\ No newline at end of file
<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-2.5.xsd">
<!-- As there is no view scope available in Spring, we have to use a custom defined scope for this purpose. -->
<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
<property name="scopes">
<map>
<entry key="view">
<bean class="kieker.webgui.common.util.ViewScope"/>
</entry>
</map>
</property>
</bean>
<!-- This is for the properties-files. -->
<bean id="globalPropertiesPlaceholder" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:global.properties</value>
</list>
</property>
</bean>
</beans>
\ No newline at end of file
<?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:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd">
<!-- The database and the transaction manager. -->
<bean id="userDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="url" value="jdbc:derby:user;create=true" />
</bean>
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="userDataSource"/>
</bean>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true"/>
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<!-- ensure that the above transactional advice runs for any execution
of an operation defined by the UserManager interface -->
<aop:config>
<aop:pointcut id="userManagerOperation" expression="execution(* kieker.webgui.common.IUserManagerFacade.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="userManagerOperation"/>
</aop:config>
<jdbc:initialize-database ignore-failures="ALL" data-source="userDataSource">
<jdbc:script location="classpath:sql/tables.sql"/>
<jdbc:script location="classpath:sql/test-data.sql"/>
</jdbc:initialize-database>
</beans>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment