From 6674572775673aa1f39e761a065d64acca27a2cf Mon Sep 17 00:00:00 2001 From: EuichanJeong <dmlcks5791@ajou.ac.kr> Date: Wed, 2 Apr 2025 17:23:20 +0900 Subject: [PATCH] jquery bootstrap test --- .../demo/controller/TestController.java | 3 +- src/main/resources/static/index.html | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/static/index.html diff --git a/src/main/java/com/example/demo/controller/TestController.java b/src/main/java/com/example/demo/controller/TestController.java index 17bf66d..5bc4a1d 100644 --- a/src/main/java/com/example/demo/controller/TestController.java +++ b/src/main/java/com/example/demo/controller/TestController.java @@ -11,7 +11,7 @@ import com.google.gson.JsonObject; @RestController public class TestController { - @RequestMapping(value = "/", method = RequestMethod.GET) + @RequestMapping(value = "/test", method = RequestMethod.GET) public String test(@RequestParam("id") String id){ JsonObject obj = new JsonObject(); @@ -26,4 +26,5 @@ public class TestController { } + } diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html new file mode 100644 index 0000000..e534d27 --- /dev/null +++ b/src/main/resources/static/index.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <title>Insert title here</title> + + <link rel="stylesheet" href="/webjars/bootstrap/5.1.3/css/bootstrap.min.css"> + <script src="/webjars/jquery/3.6.0/jquery.min.js"></script> + <script src="/webjars/popper.js/2.9.3/umd/popper.min.js"></script> + <script src="/webjars/bootstrap/5.1.3/js/bootstrap.min.js"></script> +</head> + +<body> +<div class="container"> + <table class="table table-hover"> + <thead class="thead-dark"> + <tr> + <th>codeId</th> + <th>code</th> + <th>codeNm</th> + <th>codeDc</th> + </tr> + </thead> + <tbody> + <tr> + <td>COM001</td> + <td>REG01</td> + <td>단일 게시판 이용 등록</td> + <td>단일 게시판 이용 등록</td> + </tr> + <tr> + <td>COM001</td> + <td>REG02</td> + <td>커뮤니티 등록/td> + <td>커뮤니티 등록</td> + </tr> + </tbody> + </table> +</div> +</body> +</html> -- GitLab