Skip to content
Snippets Groups Projects
Commit 8fbdce87 authored by Julian Horner's avatar Julian Horner
Browse files

Refactor controllers

parent 6e286590
No related branches found
No related tags found
No related merge requests found
......@@ -5,23 +5,38 @@
package de.rtuni.ms.ds;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Dummy controller.
* Class that handles all kind of requests.
*
* @author Julian
*
*/
@RestController
public class DummyController {
@Controller
public class HomeController {
//---------------------------------------------------------------------------------------------
/**
* Catches the request for the start page and returns the name of the corresponding template.
*
* @return The name of the template
*/
@RequestMapping("/")
public String index() {
return "Greetings from SB";
return "index";
}
/**
* Catches the request for the secure page and returns the name of the corresponding template.
*
* @return The name of the template
*/
@RequestMapping("/securePage")
public String securePage() {
return "securePage";
}
//---------------------------------------------------------------------------------------------
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment