Skip to content

Commit

Permalink
evolve(mvc): basic mvc dev loop - map path to controller which return…
Browse files Browse the repository at this point in the history
…s view
  • Loading branch information
chengcyber committed Dec 29, 2017
1 parent 8a20a04 commit c99e88a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spring-mvc-demo/WebContent/WEB-INF/view/main-menu.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<h2> Spring MVC Demo - Home Page </h2>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.luv2code.springdemo.mvc;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class HomeController {

@RequestMapping("/")
public String showPage() {
return "main-menu";
}

}

0 comments on commit c99e88a

Please sign in to comment.