package com.markbudai.openfleet.controller;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.security.Principal;

/**
 * Created by Mark on 2017. 04. 14..
 */
@Controller
public class IndexController {

    private static Logger logger = LoggerFactory.getLogger(IndexController.class);

    @RequestMapping("/")
    public String index(Model model, Principal principal) {
        model.addAttribute("path","/");
        model.addAttribute("title","Dashboard");
        model.addAttribute("username",principal.getName());
        logger.debug("Serving Index page.");
        return "index";
    }

    @RequestMapping("/errorTest")
    public String doSomething() throws Exception {
        //doing something important when suddenly...
        throw new RuntimeException("Something Happened! :c");
        //return "index";
    }
}
@@ -765,239 +765,6 @@
    %7D
-%0A%0A    @RequestMapping(%22/errorTest%22)%0A    public String doSomething() throws Exception %7B%0A        //doing something important when suddenly...%0A        throw new RuntimeException(%22Something Happened! :c%22);%0A        //return %22index%22;%0A    %7D
 %0A%7D

Clean up IndexController