diff options
Diffstat (limited to 'juick-xmpp/src/main/java/com/juick/components/configuration')
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/configuration/XmppAppConfiguration.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/configuration/XmppAppConfiguration.java b/juick-xmpp/src/main/java/com/juick/components/configuration/XmppAppConfiguration.java index 02b1556d..f14b2b23 100644 --- a/juick-xmpp/src/main/java/com/juick/components/configuration/XmppAppConfiguration.java +++ b/juick-xmpp/src/main/java/com/juick/components/configuration/XmppAppConfiguration.java @@ -23,11 +23,14 @@ package com.juick.components.configuration; import com.juick.components.s2s.BasicXmppSession; import com.juick.server.configuration.BaseWebConfiguration; +import com.juick.xmpp.helpers.JidConverter; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; +import org.springframework.core.convert.ConversionService; +import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import rocks.xmpp.core.session.Extension; @@ -58,4 +61,10 @@ public class XmppAppConfiguration extends BaseWebConfiguration { .build(); return BasicXmppSession.create(hostname, configuration); } + @Bean + public static ConversionService conversionService() { + DefaultFormattingConversionService cs = new DefaultFormattingConversionService(); + cs.addConverter(new JidConverter()); + return cs; + } } |