package com.juick.rss.configuration;

import com.juick.rss.MessagesView;
import com.juick.rss.RepliesView;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.view.BeanNameViewResolver;
import org.springframework.web.servlet.view.feed.AbstractRssFeedView;

/**
 * Created by vitalyster on 28.06.2016.
 */
@Configuration
@ComponentScan(basePackages = {"com.juick.rss.controllers"})
public class RssMvcConfiguration extends WebMvcConfigurationSupport {
    @Bean
    public BeanNameViewResolver beanNameViewResolver() {
        return new BeanNameViewResolver();
    }
    @Bean
    AbstractRssFeedView messages() {
        return new MessagesView();
    }
    @Bean
    AbstractRssFeedView replies() {
        return new RepliesView();
    }
}