package ohtuhatut.controller;

import ohtuhatut.domain.BookReference;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author tuomokar
 */
@Controller
public class DefaultController {
    
    @RequestMapping("*")
    public String index() {
        return "index";
    }
    
    /**
     * Create a test book reference and try displaying it
     * @return 
     */
    @RequestMapping("/testReference")
    public String testReference(Model model) {
        BookReference testReference = new BookReference();
        
        testReference.setTitle("Testikirja");
        testReference.setPublisher("Testikirjailijat");
        testReference.setYear(2010);
        
        model.addAttribute("testReference", testReference);
        
        return "testReference";
    }
}

@@ -382,509 +382,6 @@
   %7D%0A
-    %0A    /**%0A     * Create a test book reference and try displaying it%0A     * @return %0A     */%0A    @RequestMapping(%22/testReference%22)%0A    public String testReference(Model model) %7B%0A        BookReference testReference = new BookReference();%0A        %0A        testReference.setTitle(%22Testikirja%22);%0A        testReference.setPublisher(%22Testikirjailijat%22);%0A        testReference.setYear(2010);%0A        %0A        model.addAttribute(%22testReference%22, testReference);%0A        %0A        return %22testReference%22;%0A    %7D%0A
 %7D%0A

Remove testreference method