
crafter.profile.client-context.xml Maven / Gradle / Ivy
<?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:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> <bean name="crafter.profileProperties" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"> <property name="order" value="1000"/> <property name="ignoreUnresolvablePlaceholders" value="true"/> <property name="locations"> <list> <value>classpath:crafter/profile/client-config.properties</value> </list> </property> </bean> <!-- REST Template --> <util:list id="crafter.profileMessageConverters"> <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/> <bean class="org.springframework.http.converter.StringHttpMessageConverter"/> <bean class="org.springframework.http.converter.ResourceHttpMessageConverter"/> <bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/> <bean class="org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter"/> <bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/> <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"> <property name="objectMapper" ref="crafter.profileObjectMapper"/> </bean> </util:list> <bean id="crafter.profileRestTemplate" class="org.craftercms.commons.rest.RestTemplate"> <property name="messageConverters" ref="crafter.profileMessageConverters"/> <property name="errorResponseType" value="org.craftercms.profile.api.exceptions.ErrorDetails"/> </bean> <!-- Jackson config --> <bean id="crafter.profileObjectMapper" class="org.craftercms.commons.jackson.CustomSerializationObjectMapper" init-method="init"> <property name="serializers"> <list> <bean class="org.craftercms.commons.jackson.ObjectIdSerializer"/> </list> </property> <property name="deserializers"> <map> <entry key="org.bson.types.ObjectId"> <bean class="org.craftercms.commons.jackson.ObjectIdDeserializer"/> </entry> </map> </property> </bean> <!-- REST Clients --> <bean id="crafter.accessTokenIdResolver" class="org.craftercms.profile.services.impl.SingleAccessTokenIdResolver"> <property name="accessTokenId" value="${crafter.profile.rest.client.accessToken.id}"/> </bean> <bean id="crafter.profileRestClientBase" class="org.craftercms.profile.services.impl.AbstractProfileRestClientBase" abstract="true"> <property name="baseUrl" value="${crafter.profile.rest.client.url.base}"/> <property name="extension" value="${crafter.profile.rest.client.url.extension}"/> <property name="restTemplate" ref="crafter.profileRestTemplate"/> <property name="accessTokenIdResolver" ref="crafter.accessTokenIdResolver"/> </bean> <bean id="crafter.accessTokenServiceRestClient" class="org.craftercms.profile.services.impl.AccessTokenServiceRestClient" parent="crafter.profileRestClientBase"/> <bean id="crafter.tenantServiceRestClient" class="org.craftercms.profile.services.impl.TenantServiceRestClient" parent="crafter.profileRestClientBase"/> <bean id="crafter.profileServiceRestClient" class="org.craftercms.profile.services.impl.ProfileServiceRestClient" parent="crafter.profileRestClientBase"> <property name="objectMapper" ref="crafter.profileObjectMapper"/> </bean> <bean id="crafter.authenticationServiceRestClient" class="org.craftercms.profile.services.impl.AuthenticationServiceRestClient" parent="crafter.profileRestClientBase"/> </beans>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy