Java tutorial
/* * 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 app.igogo; 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 MvcConfig extends WebMvcConfigurerAdapter { @Override public void addViewControllers(ViewControllerRegistry registry) { super.addViewControllers(registry); //To change body of generated methods, choose Tools | Templates. registry.addViewController("/home").setViewName("home"); registry.addViewController("/").setViewName("index"); registry.addViewController("/hello").setViewName("hello"); registry.addViewController("/login").setViewName("login"); } }