add.jsp 추가

This commit is contained in:
daniel LEE 2023-10-30 23:07:27 +09:00
parent 3b0c29596a
commit 693b4c92f7
3 changed files with 44 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
@Controller
public class JSPController {
@ -30,6 +31,18 @@ public class JSPController {
// @Value("${openApi.dataType}")
// private String dataType;
@GetMapping("/add.do")
public String add(Model model) {
model.addAttribute("id", "id");
model.addAttribute("name", "name");
return "add";
}
@GetMapping("/index.do")
public String index(Model model) {

View File

@ -0,0 +1,30 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<%@ page import="com.example.demo.controller.JSPController"%>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<br>
<br>
<br>
<br>
id를 입력하세요. <input type="text" value=""><br><br>
name을 입력하세요. <input type="text" value=""><br><br>
phone을 입력하세요. <input type="text" value=""><br><br>
address를 입력하세요. <input type="text" value=""><br><br>
filePath를 입력하세요. <input type="text" value=""><br><br>
<button onclick="doSave()">저정하기</button>
<script>
function doSave() {
}
</script>
</body>
</html>

View File

@ -1,5 +1,5 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>