aboutsummaryrefslogtreecommitdiff
path: root/juick-rss/src/main/java/com/juick/rss/configuration/RssMvcConfiguration.java
blob: ef65e9effb36369154350045afe3e389d0e2e0e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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();
    }
}