From 777d38a9f039f95b966fe857685f4652dff8c3ff Mon Sep 17 00:00:00 2001 From: zxy19971014 <1094127243@qq.com> Date: Wed, 9 Jan 2019 17:20:15 +0800 Subject: [PATCH] first commit --- booksSearch/.project | 17 ++ .../.settings/org.eclipse.m2e.core.prefs | 4 + booksSearch/booksService/.classpath | 23 +++ booksSearch/booksService/.project | 42 +++++ booksSearch/booksService/.settings/.jsdtscope | 13 ++ .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.m2e.core.prefs | 4 + .../org.eclipse.wst.common.component | 12 ++ ....eclipse.wst.common.project.facet.core.xml | 7 + ...rg.eclipse.wst.jsdt.ui.superType.container | 1 + .../org.eclipse.wst.jsdt.ui.superType.name | 1 + .../org.eclipse.wst.validation.prefs | 2 + booksSearch/booksService/pom.xml | 160 ++++++++++++++++++ .../main/java/controller/StuController.java | 65 +++++++ .../main/java/controller/booksController.java | 5 + .../src/main/resources/generatorConfig.xml | 52 ++++++ .../src/main/resources/mybatis.xml | 5 + .../src/main/resources/spring-mybatis.xml | 51 ++++++ .../src/main/webapp/WEB-INF/web.xml | 7 + .../booksService/src/main/webapp/index.jsp | 5 + .../classes/controller/StuController.class | Bin 0 -> 2568 bytes .../classes/controller/booksController.class | Bin 0 -> 292 bytes .../target/classes/generatorConfig.xml | 52 ++++++ .../booksService/target/classes/mybatis.xml | 5 + .../target/classes/spring-mybatis.xml | 51 ++++++ .../web-resources/META-INF/MANIFEST.MF | 5 + .../edu.zxts/booksService/pom.properties | 7 + .../maven/edu.zxts/booksService/pom.xml | 160 ++++++++++++++++++ booksSearch/pom.xml | 10 ++ 29 files changed, 774 insertions(+) create mode 100644 booksSearch/.project create mode 100644 booksSearch/.settings/org.eclipse.m2e.core.prefs create mode 100644 booksSearch/booksService/.classpath create mode 100644 booksSearch/booksService/.project create mode 100644 booksSearch/booksService/.settings/.jsdtscope create mode 100644 booksSearch/booksService/.settings/org.eclipse.jdt.core.prefs create mode 100644 booksSearch/booksService/.settings/org.eclipse.m2e.core.prefs create mode 100644 booksSearch/booksService/.settings/org.eclipse.wst.common.component create mode 100644 booksSearch/booksService/.settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 booksSearch/booksService/.settings/org.eclipse.wst.jsdt.ui.superType.container create mode 100644 booksSearch/booksService/.settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 booksSearch/booksService/.settings/org.eclipse.wst.validation.prefs create mode 100644 booksSearch/booksService/pom.xml create mode 100644 booksSearch/booksService/src/main/java/controller/StuController.java create mode 100644 booksSearch/booksService/src/main/java/controller/booksController.java create mode 100644 booksSearch/booksService/src/main/resources/generatorConfig.xml create mode 100644 booksSearch/booksService/src/main/resources/mybatis.xml create mode 100644 booksSearch/booksService/src/main/resources/spring-mybatis.xml create mode 100644 booksSearch/booksService/src/main/webapp/WEB-INF/web.xml create mode 100644 booksSearch/booksService/src/main/webapp/index.jsp create mode 100644 booksSearch/booksService/target/classes/controller/StuController.class create mode 100644 booksSearch/booksService/target/classes/controller/booksController.class create mode 100644 booksSearch/booksService/target/classes/generatorConfig.xml create mode 100644 booksSearch/booksService/target/classes/mybatis.xml create mode 100644 booksSearch/booksService/target/classes/spring-mybatis.xml create mode 100644 booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF create mode 100644 booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/maven/edu.zxts/booksService/pom.properties create mode 100644 booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/maven/edu.zxts/booksService/pom.xml create mode 100644 booksSearch/pom.xml diff --git a/booksSearch/.project b/booksSearch/.project new file mode 100644 index 0000000..d42d60e --- /dev/null +++ b/booksSearch/.project @@ -0,0 +1,17 @@ + + + booksSearch + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/booksSearch/.settings/org.eclipse.m2e.core.prefs b/booksSearch/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/booksSearch/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/booksSearch/booksService/.classpath b/booksSearch/booksService/.classpath new file mode 100644 index 0000000..a65ef6c --- /dev/null +++ b/booksSearch/booksService/.classpath @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/booksSearch/booksService/.project b/booksSearch/booksService/.project new file mode 100644 index 0000000..89d1c8b --- /dev/null +++ b/booksSearch/booksService/.project @@ -0,0 +1,42 @@ + + + booksService + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/booksSearch/booksService/.settings/.jsdtscope b/booksSearch/booksService/.settings/.jsdtscope new file mode 100644 index 0000000..b72a6a4 --- /dev/null +++ b/booksSearch/booksService/.settings/.jsdtscope @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/booksSearch/booksService/.settings/org.eclipse.jdt.core.prefs b/booksSearch/booksService/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..45a6e0e --- /dev/null +++ b/booksSearch/booksService/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/booksSearch/booksService/.settings/org.eclipse.m2e.core.prefs b/booksSearch/booksService/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/booksSearch/booksService/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/booksSearch/booksService/.settings/org.eclipse.wst.common.component b/booksSearch/booksService/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..26a4dcd --- /dev/null +++ b/booksSearch/booksService/.settings/org.eclipse.wst.common.component @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/booksSearch/booksService/.settings/org.eclipse.wst.common.project.facet.core.xml b/booksSearch/booksService/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..d74c55e --- /dev/null +++ b/booksSearch/booksService/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/booksSearch/booksService/.settings/org.eclipse.wst.jsdt.ui.superType.container b/booksSearch/booksService/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/booksSearch/booksService/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/booksSearch/booksService/.settings/org.eclipse.wst.jsdt.ui.superType.name b/booksSearch/booksService/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/booksSearch/booksService/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/booksSearch/booksService/.settings/org.eclipse.wst.validation.prefs b/booksSearch/booksService/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000..04cad8c --- /dev/null +++ b/booksSearch/booksService/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/booksSearch/booksService/pom.xml b/booksSearch/booksService/pom.xml new file mode 100644 index 0000000..19409b3 --- /dev/null +++ b/booksSearch/booksService/pom.xml @@ -0,0 +1,160 @@ + + + 4.0.0 + + edu.zxts + booksSearch + 0.0.1-SNAPSHOT + + edu.zxts + booksService + 0.0.1-SNAPSHOT + war + booksService Maven Webapp + http://maven.apache.org + + + UTF-8 + UTF-8 + + 4.3.10.RELEASE + + + + + mysql + mysql-connector-java + 5.1.46 + + + junit + junit + 3.8.1 + test + + + + org.mybatis.generator + mybatis-generator-core + 1.3.5 + + + mysql + mysql-connector-java + 5.1.46 + + + + + org.springframework + spring-core + ${spring.version} + + + + org.springframework + spring-beans + ${spring.version} + + + + org.springframework + spring-context + ${spring.version} + + + + org.springframework + spring-jdbc + ${spring.version} + + + + org.springframework + spring-tx + ${spring.version} + + + + org.springframework + spring-web + ${spring.version} + + + + org.springframework + spring-webmvc + ${spring.version} + + + + org.springframework + spring-test + ${spring.version} + test + + + + + org.mybatis + mybatis + 3.4.2 + + + org.mybatis + mybatis-spring + 1.3.1 + + + c3p0 + c3p0 + 0.9.1.2 + + + commons-dbcp + commons-dbcp + 1.4 + + + + + junit + junit + 4.12 + test + + + + booksService + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF8 + true + + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.5 + + + ${basedir}/src/main/resources/generatorConfig.xml + true + + + + + + diff --git a/booksSearch/booksService/src/main/java/controller/StuController.java b/booksSearch/booksService/src/main/java/controller/StuController.java new file mode 100644 index 0000000..8fc98c7 --- /dev/null +++ b/booksSearch/booksService/src/main/java/controller/StuController.java @@ -0,0 +1,65 @@ +package controller; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; + +import domain.StuPO; +import service.StuService; + + +@Controller +public class StuController { + @Autowired@Qualifier("StuServiceImpl") + private StuService stuService; + @RequestMapping("/index") + public String index(){ + return "index"; + } + @RequestMapping("/search") + public String search(Model model,String num){ + StuPO stuPO=stuService.search(num); + model.addAttribute("num", stuPO.getNum()); + model.addAttribute("name", stuPO.getName()); + model.addAttribute("sex", stuPO.getSex()); + model.addAttribute("major", stuPO.getMajor()); + return "show"; + } + + @RequestMapping("/add") + public String add(StuPO stuPO){ + try{ + stuService.add(stuPO); + }catch(Exception e) + { + + } + return"addsuccess"; + } + @RequestMapping("/delete") + public String delete(String num){ + stuService.delete(num); + return "deletesuccess"; + } + + @RequestMapping("/update") + public String update(StuPO stuPO){ + stuService.update(stuPO); + return "updatesucces"; + } + public StuService getStuService() { + return stuService; + } + + public void setStuService(StuService stuService) { + this.stuService = stuService; + } + + + + + +} diff --git a/booksSearch/booksService/src/main/java/controller/booksController.java b/booksSearch/booksService/src/main/java/controller/booksController.java new file mode 100644 index 0000000..92fde27 --- /dev/null +++ b/booksSearch/booksService/src/main/java/controller/booksController.java @@ -0,0 +1,5 @@ +package controller; + +public class booksController { + +} diff --git a/booksSearch/booksService/src/main/resources/generatorConfig.xml b/booksSearch/booksService/src/main/resources/generatorConfig.xml new file mode 100644 index 0000000..3b321a6 --- /dev/null +++ b/booksSearch/booksService/src/main/resources/generatorConfig.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
\ No newline at end of file diff --git a/booksSearch/booksService/src/main/resources/mybatis.xml b/booksSearch/booksService/src/main/resources/mybatis.xml new file mode 100644 index 0000000..60a680b --- /dev/null +++ b/booksSearch/booksService/src/main/resources/mybatis.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/booksSearch/booksService/src/main/resources/spring-mybatis.xml b/booksSearch/booksService/src/main/resources/spring-mybatis.xml new file mode 100644 index 0000000..35dbc99 --- /dev/null +++ b/booksSearch/booksService/src/main/resources/spring-mybatis.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + dialect=mysql + reasonable=true + + + + + + + + + + + + + + + + + + diff --git a/booksSearch/booksService/src/main/webapp/WEB-INF/web.xml b/booksSearch/booksService/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..9f88c1f --- /dev/null +++ b/booksSearch/booksService/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,7 @@ + + + + Archetype Created Web Application + diff --git a/booksSearch/booksService/src/main/webapp/index.jsp b/booksSearch/booksService/src/main/webapp/index.jsp new file mode 100644 index 0000000..c38169b --- /dev/null +++ b/booksSearch/booksService/src/main/webapp/index.jsp @@ -0,0 +1,5 @@ + + +

Hello World!

+ + diff --git a/booksSearch/booksService/target/classes/controller/StuController.class b/booksSearch/booksService/target/classes/controller/StuController.class new file mode 100644 index 0000000000000000000000000000000000000000..86f656a40c7b3ead07ef668a52c53c4e47c12f58 GIT binary patch literal 2568 zcmd5-+fEcg5UpM=vy8wZ7X|S$c)>-G78L~+O$chDSp)$|j8DC@4K&V9kKH{WUuL3- zzWY(enqgriGz%vC;KN*Mrt0*m>N?fGet-J`08{YHfgFKBUxr4>AmECwnRxNYa-fw! z&koyVG+^NtU9RkK-w<%MiPyN=6+S1>S;m;URU$C78iz*I_=eD;67YpEl!h50Lrq|& zEY%j(krLt7reZa|C)Fof;Vjg2llexfeaemk=t6Ado>07su>TnPE@pw)6kK6w+b#=Y zB-)+vd|itI0`2o66y`aBmg3k3f!0M?IK%R^e)$ zVT%#yElZyT8%&ABu77Mb+XA(9rF@!-6A6g0%D)ikFOHpD>ojrg@d~YA;NOy5<)34& z%@T{EgeGc;rqFq~L13h@LQo*+uQ^lxHh~vK>oAA~T|yZKrIS3Z)E#;Nn1|a0WMcxU zM4KrVoE)rLB`{n}X5h+l$x5-6rcUjc6*stxqqhA%nJxi`9)#p!g20=`xh2!*yaNMw zA&#mn;o{K4x2`R2G60;G*eaP_%ELnfrZI=Z`ZiZ81iJKbYK64i^;J@-xN9<2K7S=r zl_2fx44X`}MPS_8ZQ5|fWimx+7Ey9w7A1oyE6WaGkGokN@VHwNT4V38V~~asz#hP( zlt2#JpdFtMS_QQ7`0PO2)o=j~41_MccjM>B7((#reuu(`-iu$M?;lsF8dSF%7iT37LMKLXKk&4PN}g4$dhn6B*6o&w=AfGR@6H% zYDK+!gqmxJI$}jF!k88Ho&|N>!ga!mdjAxzlNMB41*WX16dvFXo!sv!3$JM_!XxaI i3?ZwR4Pn-T&;rv~;~YFmdnW0ur)baP)sA0hVD1mUZk{_f<{cbDJO8NdYH5FVkQo3gS-YiZ-mnD1?J=MX-jTZp}gwJ6u|M^?zZBGhN9 zRMnhN8@??GeqvTKLJdzX1gH}_sVe1S_mfHcB{D4uFR96eUJ9!m-mtdwLIsV<(3JScOjlS8@uRAya&1AQ&CdIB>&5#OcQ14^7V2^&N0+GZCIS HJ#_v6o%unb literal 0 HcmV?d00001 diff --git a/booksSearch/booksService/target/classes/generatorConfig.xml b/booksSearch/booksService/target/classes/generatorConfig.xml new file mode 100644 index 0000000..3b321a6 --- /dev/null +++ b/booksSearch/booksService/target/classes/generatorConfig.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
\ No newline at end of file diff --git a/booksSearch/booksService/target/classes/mybatis.xml b/booksSearch/booksService/target/classes/mybatis.xml new file mode 100644 index 0000000..60a680b --- /dev/null +++ b/booksSearch/booksService/target/classes/mybatis.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/booksSearch/booksService/target/classes/spring-mybatis.xml b/booksSearch/booksService/target/classes/spring-mybatis.xml new file mode 100644 index 0000000..35dbc99 --- /dev/null +++ b/booksSearch/booksService/target/classes/spring-mybatis.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + dialect=mysql + reasonable=true + + + + + + + + + + + + + + + + + + diff --git a/booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF b/booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..f44188e --- /dev/null +++ b/booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Built-By: yuanhangpc +Build-Jdk: 1.8.0_152 +Created-By: Maven Integration for Eclipse + diff --git a/booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/maven/edu.zxts/booksService/pom.properties b/booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/maven/edu.zxts/booksService/pom.properties new file mode 100644 index 0000000..22e7a80 --- /dev/null +++ b/booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/maven/edu.zxts/booksService/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Wed Jan 09 17:07:46 CST 2019 +version=0.0.1-SNAPSHOT +groupId=edu.zxts +m2e.projectName=booksService +m2e.projectLocation=H\:\\sts-bundle\\booksSearch\\booksService +artifactId=booksService diff --git a/booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/maven/edu.zxts/booksService/pom.xml b/booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/maven/edu.zxts/booksService/pom.xml new file mode 100644 index 0000000..19409b3 --- /dev/null +++ b/booksSearch/booksService/target/m2e-wtp/web-resources/META-INF/maven/edu.zxts/booksService/pom.xml @@ -0,0 +1,160 @@ + + + 4.0.0 + + edu.zxts + booksSearch + 0.0.1-SNAPSHOT + + edu.zxts + booksService + 0.0.1-SNAPSHOT + war + booksService Maven Webapp + http://maven.apache.org + + + UTF-8 + UTF-8 + + 4.3.10.RELEASE + + + + + mysql + mysql-connector-java + 5.1.46 + + + junit + junit + 3.8.1 + test + + + + org.mybatis.generator + mybatis-generator-core + 1.3.5 + + + mysql + mysql-connector-java + 5.1.46 + + + + + org.springframework + spring-core + ${spring.version} + + + + org.springframework + spring-beans + ${spring.version} + + + + org.springframework + spring-context + ${spring.version} + + + + org.springframework + spring-jdbc + ${spring.version} + + + + org.springframework + spring-tx + ${spring.version} + + + + org.springframework + spring-web + ${spring.version} + + + + org.springframework + spring-webmvc + ${spring.version} + + + + org.springframework + spring-test + ${spring.version} + test + + + + + org.mybatis + mybatis + 3.4.2 + + + org.mybatis + mybatis-spring + 1.3.1 + + + c3p0 + c3p0 + 0.9.1.2 + + + commons-dbcp + commons-dbcp + 1.4 + + + + + junit + junit + 4.12 + test + + + + booksService + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF8 + true + + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.5 + + + ${basedir}/src/main/resources/generatorConfig.xml + true + + + + + + diff --git a/booksSearch/pom.xml b/booksSearch/pom.xml new file mode 100644 index 0000000..ef5391e --- /dev/null +++ b/booksSearch/pom.xml @@ -0,0 +1,10 @@ + + 4.0.0 + edu.zxts + booksSearch + 0.0.1-SNAPSHOT + pom + + booksService + + \ No newline at end of file