Skip to content
Snippets Groups Projects
Commit 18d94b60 authored by Su Sandi  Ko's avatar Su Sandi Ko
Browse files

mid commit1

parent a45d4667
Branches
No related tags found
No related merge requests found
......@@ -119,6 +119,12 @@
<version>3.5.13</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>5.1.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
<dependency>
<groupId>org.mybatis</groupId>
......
......@@ -13,9 +13,4 @@ public class DemoApplication {
SpringApplication.run(DemoApplication.class, args);
}
@GetMapping(value="/")
public String HelloWorld(){
return "Hello World";
}
}
......@@ -10,7 +10,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();
obj.addProperty("title", "산사와 아가싸");
......@@ -20,4 +20,4 @@ public class TestController {
obj.add("data", data);
return obj.toString();
}
}
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<script src="/webjars/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function () {
$("button").click(function () {
$.ajax({
type: 'GET',
url: '/test?id=1',
success: function (data) {
alert(data);
}
});
});
});
</script>
</head>
<body>
<div id="div1">
<h2>Let jQuery AJAX Change This Text</h2>
</div>
<button>Get External Content</button>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment