From ec3177faa75ac508c44cb7f4e54b3b3bd9b2cae8 Mon Sep 17 00:00:00 2001 From: bseayin Date: Sat, 24 Aug 2019 20:59:59 +0800 Subject: [PATCH] controller --- SpringBootController/SpringBootController.iml | 67 +++++++++++++++ SpringBootController/pom.xml | 51 +++++++++++ .../src/main/resources/application.properties | 2 + .../src/main/resources/static/index.html | 10 +++ .../src/main/resources/static/js/table.js | 84 +++++++++++++++++++ .../src/main/resources/static/table.html | 33 ++++++++ .../src/main/resources/static/test.html | 34 ++++++++ pom.xml | 1 + 8 files changed, 282 insertions(+) create mode 100644 SpringBootController/SpringBootController.iml create mode 100644 SpringBootController/pom.xml create mode 100644 SpringBootController/src/main/resources/application.properties create mode 100644 SpringBootController/src/main/resources/static/index.html create mode 100644 SpringBootController/src/main/resources/static/js/table.js create mode 100644 SpringBootController/src/main/resources/static/table.html create mode 100644 SpringBootController/src/main/resources/static/test.html diff --git a/SpringBootController/SpringBootController.iml b/SpringBootController/SpringBootController.iml new file mode 100644 index 0000000..d261fc9 --- /dev/null +++ b/SpringBootController/SpringBootController.iml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SpringBootController/pom.xml b/SpringBootController/pom.xml new file mode 100644 index 0000000..a2db80c --- /dev/null +++ b/SpringBootController/pom.xml @@ -0,0 +1,51 @@ + + + + SpringBoot2 + zz + 0.0.1-SNAPSHOT + + 4.0.0 + + SpringBootController + + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-devtools + true + + + + + mysql + mysql-connector-java + 8.0.15 + + + + + + alimaven + aliyun maven + http://maven.aliyun.com/nexus/content/groups/public/ + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + \ No newline at end of file diff --git a/SpringBootController/src/main/resources/application.properties b/SpringBootController/src/main/resources/application.properties new file mode 100644 index 0000000..a681a5e --- /dev/null +++ b/SpringBootController/src/main/resources/application.properties @@ -0,0 +1,2 @@ +server.port=9088 +server.servlet.context-path=/controller \ No newline at end of file diff --git a/SpringBootController/src/main/resources/static/index.html b/SpringBootController/src/main/resources/static/index.html new file mode 100644 index 0000000..62ad5cc --- /dev/null +++ b/SpringBootController/src/main/resources/static/index.html @@ -0,0 +1,10 @@ + + + + +Insert title here + + +hello controller + + \ No newline at end of file diff --git a/SpringBootController/src/main/resources/static/js/table.js b/SpringBootController/src/main/resources/static/js/table.js new file mode 100644 index 0000000..b00c0d5 --- /dev/null +++ b/SpringBootController/src/main/resources/static/js/table.js @@ -0,0 +1,84 @@ + $(document).ready(function(){ + // 在这里写你的代码... + $.getJSON("all", function(json){ + console.log(json); + $("#tbodymainbtn").empty(); + for(var i=0;i" + +""+ json[i].id + +"" + +""+ json[i].name + +"" + +""+ json[i].age + +"" + +"" +"   " + +"" + ); + $("#tbodymainbtn").append( + "
" + +"" + +"" + +"" + +"" + +"
" + ); + } + + + //jquery 样式查找 “点+样式名字” + $("button[name='btn001']").click(function(){ + var id=this.id; + //截取剩余 + var numb = id.slice(4); + console.log("****************"+id); + $("#tridval"+numb).hide(); + $("#tridval2"+numb).show(); + + }); + + + $("button[name='btn002']").click(function(){ + var id=this.id; + //截取剩余 + var numb = id.slice(4); + console.log("****************"+id); + var nval=$("#name2"+numb).val(); + var aval=$("#age2"+numb).val(); + console.log("********name2********"+nval); + console.log("********age2********"+aval); + + $("#tridval"+numb).show(); + $("#tridval2"+numb).hide(); + + + }); + + + $("button[name='btn003']").click(function(){ + var id=this.id; + //截取剩余 + var numb = id.slice(4); + console.log("****************"+id); + console.log("****************"+numb); + + $.getJSON("delete", { uid: numb}, function(json){ + console.log("******delete**********"+numb,json); + window.location.href="table.html" + }); + + + + + }); + + + + });//$.getJSON("UserServlet", function(json){ + + }); + + \ No newline at end of file diff --git a/SpringBootController/src/main/resources/static/table.html b/SpringBootController/src/main/resources/static/table.html new file mode 100644 index 0000000..cf6f0e5 --- /dev/null +++ b/SpringBootController/src/main/resources/static/table.html @@ -0,0 +1,33 @@ + + + + 用户管理 + + + + + + + + + +
+

用户管理

+
+ + + + + + + + + + + +
学号姓名年龄操作
+
+
+ + + \ No newline at end of file diff --git a/SpringBootController/src/main/resources/static/test.html b/SpringBootController/src/main/resources/static/test.html new file mode 100644 index 0000000..7e7255d --- /dev/null +++ b/SpringBootController/src/main/resources/static/test.html @@ -0,0 +1,34 @@ + + + + Bootstrap 实例 + + + + + + + + + +
+

测试

+ + + + + + +
+ + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index c6d1a46..43ad0ff 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,7 @@ SpringBootHomework SpringBootSwagger2 SpringBootShiroRememberMe + SpringBootController