diff options
author | Vitaly Takmazov | 2022-12-15 19:51:49 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-15 19:51:56 +0300 |
commit | c9617232d5eeced643b510c108384619a7fc79b0 (patch) | |
tree | 2c08a3084f21b8c54a2bdfba6331db13991b60af /src/main/java/com/juick/config/XMPPConfig.java | |
parent | 5933eac025502978a4c0e3546ed9504408e6969c (diff) |
Extract user to actor conversion code into Converter
Diffstat (limited to 'src/main/java/com/juick/config/XMPPConfig.java')
-rw-r--r-- | src/main/java/com/juick/config/XMPPConfig.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/com/juick/config/XMPPConfig.java b/src/main/java/com/juick/config/XMPPConfig.java index cde4c0dc..8604b52b 100644 --- a/src/main/java/com/juick/config/XMPPConfig.java +++ b/src/main/java/com/juick/config/XMPPConfig.java @@ -19,20 +19,18 @@ package com.juick.config; import com.juick.XMPPManager; import com.juick.util.xmpp.JidConverter; + import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.convert.ConversionService; -import org.springframework.format.support.DefaultFormattingConversionService; @Configuration @ConditionalOnProperty("xmppbot_jid") public class XMPPConfig { + @Bean - static ConversionService conversionService() { - DefaultFormattingConversionService cs = new DefaultFormattingConversionService(); - cs.addConverter(new JidConverter()); - return cs; + JidConverter jidConverter() { + return new JidConverter(); } @Bean |