From 69e7a6af07742a075716fa9c30087c68170f6dc6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 18 Feb 2018 01:07:19 +0300 Subject: server: merge rss --- .../juick/server/configuration/ApiAppConfiguration.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'juick-server/src/main/java/com/juick/server/configuration') diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java index 55050f7e..ad417807 100644 --- a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java +++ b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java @@ -18,6 +18,8 @@ package com.juick.server.configuration; import com.juick.server.WebsocketManager; +import com.juick.server.api.rss.MessagesView; +import com.juick.server.api.rss.RepliesView; import com.juick.server.component.JuickServerComponent; import com.juick.server.component.JuickServerReconnectManager; import com.juick.service.UserService; @@ -32,6 +34,8 @@ import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.view.BeanNameViewResolver; +import org.springframework.web.servlet.view.feed.AbstractRssFeedView; import org.springframework.web.socket.client.WebSocketConnectionManager; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import org.springframework.web.socket.config.annotation.EnableWebSocket; @@ -149,6 +153,18 @@ public class ApiAppConfiguration extends BaseWebConfiguration implements WebSock cs.addConverter(new JidConverter()); return cs; } + @Bean + public BeanNameViewResolver beanNameViewResolver() { + return new BeanNameViewResolver(); + } + @Bean + AbstractRssFeedView messages() { + return new MessagesView(); + } + @Bean + AbstractRssFeedView replies() { + return new RepliesView(); + } @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { configurer.enable(); -- cgit v1.2.3