config-context.xml 1.44 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:context="http://www.springframework.org/schema/context"
	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.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">

	<context:annotation-config/>
	
	<bean id="configLocation" class="java.lang.String">
11
		<constructor-arg value="classpath:dariahsp_local_sample.yml" />
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
	</bean>
	<bean id="properties" class="org.springframework.beans.factory.config.YamlPropertiesFactoryBean">
	    <property name="resources" ref="configLocation"/>
	</bean>

	<bean class="eu.dariah.de.minfba.core.util.init.ListAwarePropertySourcesPlaceholderConfigurer">
	    <property name="properties" ref="properties" />
	    <property name="objectMapper" ref="objectMapper" />
	    <property name="conversionService" ref="conversionService" />
	</bean>
	
	<bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean">
        <property name="converters">
            <list>
                <bean class="eu.dariah.de.minfba.core.util.conversion.JsonToStringConverter" />
            </list>
        </property>
    </bean>
	
	<bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper" />
	
</beans>