com.ecto.engine.config.WebConfig.java Source code

Java tutorial

Introduction

Here is the source code for com.ecto.engine.config.WebConfig.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ecto.engine.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/index").setViewName("index");
        registry.addViewController("/").setViewName("index");
        registry.addViewController("/login").setViewName("login");
        registry.addViewController("/register").setViewName("register");
        registry.addViewController("/article").setViewName("article");
        registry.addViewController("/page").setViewName("page");
        registry.addViewController("/account").setViewName("account");
        registry.addViewController("/profile").setViewName("profile");
        registry.addViewController("/contact").setViewName("contact");
        registry.addViewController("/dashboard").setViewName("dashboard");
        registry.addViewController("/dashboard/users/create").setViewName("dashboard_users_create");
        registry.addViewController("/dashboard/users/edit").setViewName("dashboard_users_edit");
        registry.addViewController("/dashboard/users").setViewName("dashboard_users");
        registry.addViewController("/dashboard/articles/create").setViewName("dashboard_articles_create");
        registry.addViewController("/dashboard/articles/edit").setViewName("dashboard_articles_edit");
        registry.addViewController("/dashboard/articles").setViewName("dashboard_articles");
    }
}