guyanqing 1 tahun lalu
induk
melakukan
f4eafa7ab9
82 mengubah file dengan 1469 tambahan dan 49 penghapusan
  1. 31 8
      04maven/mybatis/.idea/workspace.xml
  2. 39 32
      04maven/spring/.idea/workspace.xml
  3. 13 0
      SSM/.idea/compiler.xml
  4. 7 0
      SSM/.idea/encodings.xml
  5. 20 0
      SSM/.idea/jarRepositories.xml
  6. 17 0
      SSM/.idea/misc.xml
  7. 6 0
      SSM/.idea/vcs.xml
  8. 187 0
      SSM/.idea/workspace.xml
  9. 194 0
      SSM/pom.xml
  10. 96 0
      SSM/src/main/java/com/sf/controller/BookController.java
  11. 58 0
      SSM/src/main/java/com/sf/dto/Result.java
  12. 75 0
      SSM/src/main/java/com/sf/entity/Book.java
  13. 50 0
      SSM/src/main/java/com/sf/mapper/BookMapper.java
  14. 58 0
      SSM/src/main/java/com/sf/service/BookService.java
  15. 96 0
      SSM/src/main/java/com/sf/service/impl/BookServiceImpl.java
  16. 60 0
      SSM/src/main/resources/applicationContext.xml
  17. 3 0
      SSM/src/main/resources/db.properties
  18. 36 0
      SSM/src/main/resources/mapper/BookMapper.xml
  19. 15 0
      SSM/src/main/resources/mybatis-config.xml
  20. 11 0
      SSM/src/main/resources/步骤
  21. 27 0
      SSM/src/main/webapp/WEB-INF/springDispatcherServlet-servlet.xml
  22. 26 0
      SSM/src/main/webapp/WEB-INF/web.xml
  23. 5 0
      SSM/src/main/webapp/index.jsp
  24. TEMPAT SAMPAH
      SSM/target/SSM.war
  25. 5 0
      SSM/target/SSM/META-INF/MANIFEST.MF
  26. 60 0
      SSM/target/SSM/WEB-INF/classes/applicationContext.xml
  27. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/classes/com/sf/controller/BookController.class
  28. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/classes/com/sf/dto/Result.class
  29. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/classes/com/sf/entity/Book.class
  30. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/classes/com/sf/mapper/BookMapper.class
  31. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/classes/com/sf/service/BookService.class
  32. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/classes/com/sf/service/impl/BookServiceImpl.class
  33. 3 0
      SSM/target/SSM/WEB-INF/classes/db.properties
  34. 36 0
      SSM/target/SSM/WEB-INF/classes/mapper/BookMapper.xml
  35. 15 0
      SSM/target/SSM/WEB-INF/classes/mybatis-config.xml
  36. 11 0
      SSM/target/SSM/WEB-INF/classes/步骤
  37. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/activation-1.1.jar
  38. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/aspectjweaver-1.8.9.jar
  39. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/commons-logging-1.2.jar
  40. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/druid-1.1.6.jar
  41. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/jackson-annotations-2.5.0.jar
  42. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/jackson-core-2.5.4.jar
  43. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/jackson-databind-2.5.4.jar
  44. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/javaee-api-7.0.jar
  45. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/javax.mail-1.5.0.jar
  46. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/jsp-api-2.1.jar
  47. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/jsqlparser-1.0.jar
  48. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/jstl-api-1.2.jar
  49. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/jstl-impl-1.2.jar
  50. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/mybatis-3.4.6.jar
  51. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/mybatis-spring-1.3.2.jar
  52. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/mysql-connector-java-5.1.46.jar
  53. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/pagehelper-5.1.2.jar
  54. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/servlet-api-2.5.jar
  55. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-aop-4.3.27.RELEASE.jar
  56. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-aspects-4.3.27.RELEASE.jar
  57. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-beans-4.3.27.RELEASE.jar
  58. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-context-4.3.27.RELEASE.jar
  59. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-context-support-4.3.27.RELEASE.jar
  60. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-core-4.3.27.RELEASE.jar
  61. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-expression-4.3.27.RELEASE.jar
  62. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-jdbc-4.3.27.RELEASE.jar
  63. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-orm-4.3.27.RELEASE.jar
  64. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-test-4.3.27.RELEASE.jar
  65. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-tx-4.3.27.RELEASE.jar
  66. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-web-4.3.27.RELEASE.jar
  67. TEMPAT SAMPAH
      SSM/target/SSM/WEB-INF/lib/spring-webmvc-4.3.27.RELEASE.jar
  68. 27 0
      SSM/target/SSM/WEB-INF/springDispatcherServlet-servlet.xml
  69. 26 0
      SSM/target/SSM/WEB-INF/web.xml
  70. 5 0
      SSM/target/SSM/index.jsp
  71. 60 0
      SSM/target/classes/applicationContext.xml
  72. TEMPAT SAMPAH
      SSM/target/classes/com/sf/controller/BookController.class
  73. TEMPAT SAMPAH
      SSM/target/classes/com/sf/dto/Result.class
  74. TEMPAT SAMPAH
      SSM/target/classes/com/sf/entity/Book.class
  75. TEMPAT SAMPAH
      SSM/target/classes/com/sf/mapper/BookMapper.class
  76. TEMPAT SAMPAH
      SSM/target/classes/com/sf/service/BookService.class
  77. TEMPAT SAMPAH
      SSM/target/classes/com/sf/service/impl/BookServiceImpl.class
  78. 3 0
      SSM/target/classes/db.properties
  79. 36 0
      SSM/target/classes/mapper/BookMapper.xml
  80. 15 0
      SSM/target/classes/mybatis-config.xml
  81. 11 0
      SSM/target/classes/步骤
  82. 26 9
      springmvc/.idea/workspace.xml

+ 31 - 8
04maven/mybatis/.idea/workspace.xml

@@ -5,15 +5,36 @@
   </component>
   </component>
   <component name="ChangeListManager">
   <component name="ChangeListManager">
     <list default="true" id="ce9a7213-3ec1-4f41-8ade-c4d87d022933" name="Changes" comment="">
     <list default="true" id="ce9a7213-3ec1-4f41-8ade-c4d87d022933" name="Changes" comment="">
-      <change afterPath="$PROJECT_DIR$/../spring/.idea/.gitignore" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/../spring/.idea/misc.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/../spring/.idea/vcs.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/../spring/.idea/workspace.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/../spring/pom.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/../spring/src/main/java/com/sf/App.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/../spring/src/test/java/com/sf/AppTest.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/compiler.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/encodings.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/jarRepositories.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/misc.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/vcs.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/workspace.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/pom.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/java/com/sf/controller/BookController.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/java/com/sf/dto/Result.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/java/com/sf/entity/Book.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/java/com/sf/mapper/BookMapper.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/java/com/sf/service/BookService.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/java/com/sf/service/impl/BookServiceImpl.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/resources/applicationContext.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/resources/db.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/resources/mapper/BookMapper.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/resources/mybatis-config.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/webapp/WEB-INF/springDispatcherServlet-servlet.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/webapp/WEB-INF/web.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/webapp/index.jsp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/SSM.war" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/SSM/META-INF/MANIFEST.MF" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/SSM/WEB-INF/web.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/SSM/index.jsp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/classes/applicationContext.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/classes/db.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/classes/mybatis-config.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/sf/dto/JsonArrayTypeHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/sf/dto/JsonArrayTypeHandler.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../spring/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../spring/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../../springmvc/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/.idea/workspace.xml" afterDir="false" />
     </list>
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -175,6 +196,8 @@
       <workItem from="1689489423797" duration="8067000" />
       <workItem from="1689489423797" duration="8067000" />
       <workItem from="1689584772400" duration="62578000" />
       <workItem from="1689584772400" duration="62578000" />
       <workItem from="1689993826879" duration="293000" />
       <workItem from="1689993826879" duration="293000" />
+      <workItem from="1690958396391" duration="69000" />
+      <workItem from="1690959895931" duration="669000" />
     </task>
     </task>
     <servers />
     <servers />
   </component>
   </component>

+ 39 - 32
04maven/spring/.idea/workspace.xml

@@ -5,22 +5,28 @@
   </component>
   </component>
   <component name="ChangeListManager">
   <component name="ChangeListManager">
     <list default="true" id="8c3e0ed0-6141-4ee9-a284-3fa2d43ee5eb" name="Changes" comment="">
     <list default="true" id="8c3e0ed0-6141-4ee9-a284-3fa2d43ee5eb" name="Changes" comment="">
-      <change afterPath="$PROJECT_DIR$/../../springmvc/src/main/java/com/sf/conroller/CommonException.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/../../springmvc/src/main/webapp/WEB-INF/views/error.jsp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/compiler.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/encodings.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/jarRepositories.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/misc.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/vcs.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/.idea/workspace.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/pom.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/resources/applicationContext.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/resources/db.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/resources/mybatis-config.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/webapp/WEB-INF/springDispatcherServlet.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/webapp/WEB-INF/web.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/src/main/webapp/index.jsp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/SSM.war" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/SSM/META-INF/MANIFEST.MF" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/SSM/WEB-INF/web.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/SSM/index.jsp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/classes/applicationContext.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/classes/db.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../../SSM/target/classes/mybatis-config.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../../springmvc/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../../springmvc/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/pom.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/src/main/java/com/sf/conroller/BookController.java" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/src/main/java/com/sf/conroller/BookController.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/src/main/java/com/sf/conroller/HelloController.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/src/main/webapp/WEB-INF/dispatcherServlet-servlet.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/src/main/webapp/WEB-INF/dispatcherServlet-servlet.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/src/main/webapp/index.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/src/main/webapp/index.jsp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/target/classes/com/sf/conroller/BookController.class" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/target/classes/com/sf/conroller/BookController.class" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/target/classes/com/sf/conroller/HelloController.class" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/target/springmvc.war" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/target/springmvc.war" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/target/springmvc/WEB-INF/classes/com/sf/conroller/BookController.class" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/target/springmvc/WEB-INF/classes/com/sf/conroller/BookController.class" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/target/springmvc/WEB-INF/classes/com/sf/conroller/HelloController.class" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/target/springmvc/WEB-INF/dispatcherServlet-servlet.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/target/springmvc/WEB-INF/dispatcherServlet-servlet.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../../springmvc/target/springmvc/index.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/../../springmvc/target/springmvc/index.jsp" afterDir="false" />
     </list>
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -49,25 +55,25 @@
   <component name="ProjectViewState">
   <component name="ProjectViewState">
     <option name="showLibraryContents" value="true" />
     <option name="showLibraryContents" value="true" />
   </component>
   </component>
-  <component name="PropertiesComponent"><![CDATA[{
-  "keyToString": {
-    "RunOnceActivity.OpenProjectViewOnStart": "true",
-    "RunOnceActivity.ShowReadmeOnStart": "true",
-    "SHARE_PROJECT_CONFIGURATION_FILES": "true",
-    "WebServerToolWindowFactoryState": "false",
-    "last_opened_file_path": "C:/Users/Lenovo/Desktop/spring1",
-    "node.js.detected.package.eslint": "true",
-    "node.js.detected.package.tslint": "true",
-    "node.js.selected.package.eslint": "(autodetect)",
-    "node.js.selected.package.tslint": "(autodetect)",
-    "project.structure.last.edited": "Modules",
-    "project.structure.proportion": "0.15",
-    "project.structure.side.proportion": "0.13333334",
-    "settings.editor.selected.configurable": "editor.preferences.fonts.default",
-    "spring.configuration.checksum": "2a2d595e6ed9a0b24f027f2b63b134d6",
-    "vue.rearranger.settings.migration": "true"
+  <component name="PropertiesComponent">{
+  &quot;keyToString&quot;: {
+    &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
+    &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
+    &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
+    &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
+    &quot;last_opened_file_path&quot;: &quot;C:/Users/Lenovo/Desktop/spring1&quot;,
+    &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
+    &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
+    &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
+    &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
+    &quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
+    &quot;project.structure.proportion&quot;: &quot;0.15&quot;,
+    &quot;project.structure.side.proportion&quot;: &quot;0.13333334&quot;,
+    &quot;settings.editor.selected.configurable&quot;: &quot;editor.preferences.fonts.default&quot;,
+    &quot;spring.configuration.checksum&quot;: &quot;2a2d595e6ed9a0b24f027f2b63b134d6&quot;,
+    &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
   }
   }
-}]]></component>
+}</component>
   <component name="RunManager" selected="JUnit.TxTest3.t1">
   <component name="RunManager" selected="JUnit.TxTest3.t1">
     <configuration name="AopTest.t1 (1)" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
     <configuration name="AopTest.t1 (1)" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
       <module name="spring" />
       <module name="spring" />
@@ -169,6 +175,7 @@
       <updated>1689993904831</updated>
       <updated>1689993904831</updated>
       <workItem from="1689993906819" duration="76525000" />
       <workItem from="1689993906819" duration="76525000" />
       <workItem from="1690702886400" duration="792000" />
       <workItem from="1690702886400" duration="792000" />
+      <workItem from="1690944564147" duration="645000" />
     </task>
     </task>
     <servers />
     <servers />
   </component>
   </component>

+ 13 - 0
SSM/.idea/compiler.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <annotationProcessing>
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="SSM" />
+      </profile>
+    </annotationProcessing>
+  </component>
+</project>

+ 7 - 0
SSM/.idea/encodings.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
+  </component>
+</project>

+ 20 - 0
SSM/.idea/jarRepositories.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Maven Central repository" />
+      <option name="url" value="https://repo1.maven.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="jboss.community" />
+      <option name="name" value="JBoss Community repository" />
+      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+    </remote-repository>
+  </component>
+</project>

+ 17 - 0
SSM/.idea/misc.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="FrameworkDetectionExcludesConfiguration">
+    <file type="web" url="file://$PROJECT_DIR$" />
+  </component>
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 6 - 0
SSM/.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+  </component>
+</project>

+ 187 - 0
SSM/.idea/workspace.xml

@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ArtifactsWorkspaceSettings">
+    <artifacts-to-build>
+      <artifact name="SSM:war" />
+    </artifacts-to-build>
+  </component>
+  <component name="AutoImportSettings">
+    <option name="autoReloadType" value="SELECTIVE" />
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" id="e79aedb9-1106-467c-a7a4-a57fa65eeabc" name="Changes" comment="">
+      <change afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/jarRepositories.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/sf/controller/BookController.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/sf/dto/Result.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/sf/entity/Book.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/sf/mapper/BookMapper.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/sf/service/BookService.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/sf/service/impl/BookServiceImpl.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/resources/applicationContext.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/resources/db.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/resources/mapper/BookMapper.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/resources/mybatis-config.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/resources/步骤" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/springDispatcherServlet-servlet.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/webapp/index.jsp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/target/SSM.war" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/target/SSM/META-INF/MANIFEST.MF" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/target/SSM/WEB-INF/web.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/target/SSM/index.jsp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/target/classes/applicationContext.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/target/classes/db.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/target/classes/mybatis-config.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../04maven/mybatis/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../04maven/mybatis/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../04maven/spring/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../04maven/spring/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../springmvc/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../springmvc/.idea/workspace.xml" afterDir="false" />
+    </list>
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="FileTemplateManagerImpl">
+    <option name="RECENT_TEMPLATES">
+      <list>
+        <option value="spring-beans.schema" />
+        <option value="Interface" />
+        <option value="Class" />
+      </list>
+    </option>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
+  </component>
+  <component name="LogFilters">
+    <option name="FILTER_ERRORS" value="false" />
+    <option name="FILTER_WARNINGS" value="false" />
+    <option name="FILTER_INFO" value="true" />
+    <option name="FILTER_DEBUG" value="true" />
+    <option name="CUSTOM_FILTER" />
+  </component>
+  <component name="MarkdownSettingsMigration">
+    <option name="stateVersion" value="1" />
+  </component>
+  <component name="ProjectId" id="2TPLsY4wI7AR6w0K64mPsq2DwN3" />
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true">
+    <ConfirmationsSetting value="2" id="Add" />
+  </component>
+  <component name="ProjectViewState">
+    <option name="showLibraryContents" value="true" />
+  </component>
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
+    "RunOnceActivity.OpenProjectViewOnStart": "true",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+    "WebServerToolWindowFactoryState": "false",
+    "node.js.detected.package.eslint": "true",
+    "node.js.detected.package.tslint": "true",
+    "node.js.selected.package.eslint": "(autodetect)",
+    "node.js.selected.package.tslint": "(autodetect)",
+    "project.structure.last.edited": "Modules",
+    "project.structure.proportion": "0.0",
+    "project.structure.side.proportion": "0.0",
+    "spring.configuration.checksum": "a7885c51c567427cd74513f0c6e0d563",
+    "vue.rearranger.settings.migration": "true"
+  }
+}]]></component>
+  <component name="RunManager">
+    <configuration name="Tomcat-SSM" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat 9.0.70" ALTERNATIVE_JRE_ENABLED="false">
+      <option name="UPDATING_POLICY" value="restart-server" />
+      <deployment>
+        <artifact name="SSM:war">
+          <settings>
+            <option name="CONTEXT_PATH" value="/" />
+          </settings>
+        </artifact>
+      </deployment>
+      <server-settings>
+        <option name="BASE_DIRECTORY_NAME" value="0221410b-d3d5-436d-859f-18c2341e7598" />
+      </server-settings>
+      <predefined_log_file enabled="true" id="Tomcat" />
+      <predefined_log_file enabled="true" id="Tomcat Catalina" />
+      <predefined_log_file id="Tomcat Manager" />
+      <predefined_log_file id="Tomcat Host Manager" />
+      <predefined_log_file id="Tomcat Localhost Access" />
+      <RunnerSettings RunnerId="Debug">
+        <option name="DEBUG_PORT" value="61428" />
+      </RunnerSettings>
+      <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
+        <option name="USE_ENV_VARIABLES" value="true" />
+        <STARTUP>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </STARTUP>
+        <SHUTDOWN>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </SHUTDOWN>
+      </ConfigurationWrapper>
+      <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
+        <option name="USE_ENV_VARIABLES" value="true" />
+        <STARTUP>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </STARTUP>
+        <SHUTDOWN>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </SHUTDOWN>
+      </ConfigurationWrapper>
+      <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
+        <option name="USE_ENV_VARIABLES" value="true" />
+        <STARTUP>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </STARTUP>
+        <SHUTDOWN>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </SHUTDOWN>
+      </ConfigurationWrapper>
+      <method v="2">
+        <option name="Make" enabled="true" />
+        <option name="BuildArtifacts" enabled="true">
+          <artifact name="SSM:war" />
+        </option>
+      </method>
+    </configuration>
+  </component>
+  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="e79aedb9-1106-467c-a7a4-a57fa65eeabc" name="Changes" comment="" />
+      <created>1690939977275</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1690939977275</updated>
+      <workItem from="1690939978968" duration="3475000" />
+      <workItem from="1690946298942" duration="15831000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="3" />
+  </component>
+</project>

+ 194 - 0
SSM/pom.xml

@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.sf</groupId>
+  <artifactId>SSM</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>war</packaging>
+
+  <name>SSM Maven Webapp</name>
+  <!-- FIXME change it to the project's website -->
+  <url>http://www.example.com</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.8</maven.compiler.source>
+    <maven.compiler.target>1.8</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.12</version>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- spring框架 start -->
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-aop</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-tx</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-orm</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-aspects</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-expression</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-jdbc</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-webmvc</artifactId>
+      <version>4.3.27.RELEASE</version>
+    </dependency>
+    <!-- spring框架 end -->
+
+
+    <!-- 数据库驱动数据库连接池start -->
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+      <version>5.1.46</version>
+    </dependency>
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>druid</artifactId>
+      <version>1.1.6</version>
+    </dependency>
+    <!-- 数据库驱动数据库连接池end -->
+
+    <!-- mybatis框架 start -->
+    <dependency>
+      <groupId>org.mybatis</groupId>
+      <artifactId>mybatis</artifactId>
+      <version>3.4.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.mybatis</groupId>
+      <artifactId>mybatis-spring</artifactId>
+      <version>1.3.2</version>
+    </dependency>
+    <dependency>
+      <groupId>com.github.pagehelper</groupId>
+      <artifactId>pagehelper</artifactId>
+      <version>5.1.2</version>
+    </dependency>
+    <!-- mybatis框架 end -->
+
+    <dependency>
+      <groupId>javax</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>7.0</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet.jsp.jstl</groupId>
+      <artifactId>jstl-api</artifactId>
+      <version>1.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.glassfish.web</groupId>
+      <artifactId>jstl-impl</artifactId>
+      <version>1.2</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
+      <version>2.5.4</version>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <version>2.5.4</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <finalName>SSM</finalName>
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+      <plugins>
+        <plugin>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+        <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-war-plugin</artifactId>
+          <version>3.2.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.5.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>

+ 96 - 0
SSM/src/main/java/com/sf/controller/BookController.java

@@ -0,0 +1,96 @@
+package com.sf.controller;
+
+import com.sf.dto.Result;
+import com.sf.entity.Book;
+import com.sf.service.BookService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.List;
+
+/**
+ * 编写图书的controller
+ */
+@Controller
+public class BookController {
+    /**
+     * controller调用service
+     */
+    @Autowired
+    private BookService bookService;
+
+    /**
+     * 添加的方法
+     * @param book
+     * @return
+     */
+    @RequestMapping(value = "/addBook")
+    @ResponseBody
+    public Result addBook(@RequestBody Book book){
+        bookService.addBook(book);
+        System.out.println(book);
+        Result result = new Result(200, "添加成功", book);
+        return result;
+    }
+
+    @RequestMapping(value = "/updateBook")
+    @ResponseBody
+    public Result updateBook(@RequestBody Book book){
+        bookService.updateBook(book);
+        System.out.println(book);
+        Result result = new Result(200, "更新成功", book);
+        return result;
+    }
+
+    @RequestMapping(value = "/deleteBook")
+    @ResponseBody
+    public Result deleteBook(@RequestBody Book book){
+        bookService.deleteBook(book.getBookId());
+        System.out.println(book.getBookId());
+        Result result = new Result(200, "删除成功", book.getBookId());
+        return result;
+    }
+
+    @RequestMapping(value = "/getList")
+    @ResponseBody
+    public Result getList(){
+        List<Book> list = bookService.getList();
+        System.out.println(list);
+        Result result = new Result(200, "查询成功", list);
+        return result;
+    }
+
+
+    @RequestMapping(value = "/getBookByBookId")
+    @ResponseBody
+    public Result getBookByBookId(@RequestBody Book book){
+        Book bookByBookId = bookService.getBookByBookId(book.getBookId());
+        System.out.println(bookByBookId);
+        Result result = new Result(200, "查询成功", bookByBookId);
+        return result;
+    }
+
+
+    @RequestMapping(value = "/getBookWithLike")
+    @ResponseBody
+    public Result getBookWithLike(@RequestBody Book book){
+        List<Book> bookWithLike = bookService.getBookWithLike(book.getBookName());
+        System.out.println(bookWithLike);
+        Result result = new Result(200, "查询成功", bookWithLike);
+        return result;
+    }
+
+    @RequestMapping(value = "/getBookWithPage")
+    @ResponseBody
+    public Result getBookWithPage(Integer pageNo,Integer pageSize){
+        System.out.println(pageNo);
+        System.out.println(pageSize);
+        List<Book> bookWithPage = bookService.getBookWithPage(pageNo,pageSize);
+        System.out.println(bookWithPage);
+        Result result = new Result(200, "分页查询成功", bookWithPage);
+        return result;
+    }
+}

+ 58 - 0
SSM/src/main/java/com/sf/dto/Result.java

@@ -0,0 +1,58 @@
+package com.sf.dto;
+
+public class Result {
+    /**
+     * 标识code码
+     */
+    private Integer code;
+    /**
+     * 提示消息
+     */
+    private String msg;
+    /**
+     * 数据
+     */
+    private Object data;
+
+    public Result() {
+    }
+
+    public Result(Integer code, String msg, Object data) {
+        this.code = code;
+        this.msg = msg;
+        this.data = data;
+    }
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public void setCode(Integer code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public Object getData() {
+        return data;
+    }
+
+    public void setData(Object data) {
+        this.data = data;
+    }
+
+    @Override
+    public String toString() {
+        return "Result{" +
+                "code=" + code +
+                ", msg='" + msg + '\'' +
+                ", data=" + data +
+                '}';
+    }
+}

+ 75 - 0
SSM/src/main/java/com/sf/entity/Book.java

@@ -0,0 +1,75 @@
+package com.sf.entity;
+
+/**
+ * 映射数据库book表的实体类
+ */
+public class Book {
+    /**
+     * bookId
+     */
+    private Integer bookId;
+    /**
+     * 图书名称
+     */
+    private  String bookName;
+    /**
+     * 作者名称
+     */
+    private String authorName;
+    /**
+     * 图书的价格
+     */
+    private Double price;
+
+    public Book() {
+    }
+
+    public Book(Integer bookId, String bookName, String authorName, Double price) {
+        this.bookId = bookId;
+        this.bookName = bookName;
+        this.authorName = authorName;
+        this.price = price;
+    }
+
+    public Integer getBookId() {
+        return bookId;
+    }
+
+    public void setBookId(Integer bookId) {
+        this.bookId = bookId;
+    }
+
+    public String getBookName() {
+        return bookName;
+    }
+
+    public void setBookName(String bookName) {
+        this.bookName = bookName;
+    }
+
+    public String getAuthorName() {
+        return authorName;
+    }
+
+    public void setAuthorName(String authorName) {
+        this.authorName = authorName;
+    }
+
+    public Double getPrice() {
+        return price;
+    }
+
+    public void setPrice(Double price) {
+        this.price = price;
+    }
+
+    @Override
+    public String toString() {
+        return "Book{" +
+                "bookId=" + bookId +
+                ", bookName='" + bookName + '\'' +
+                ", authorName='" + authorName + '\'' +
+                ", price=" + price +
+                '}';
+    }
+}

+ 50 - 0
SSM/src/main/java/com/sf/mapper/BookMapper.java

@@ -0,0 +1,50 @@
+package com.sf.mapper;
+
+import com.sf.entity.Book;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+public interface BookMapper {
+
+    /**
+     * 图书的添加
+     */
+
+    void addBook(Book book);
+
+    /**
+     * 图书的修改
+     * @param book
+     */
+    void updateBook(Book book);
+
+    /**
+     * 删除图书   根据图书id删除图书
+     * @param bookId
+     */
+    void deleteBook(Integer bookId);
+
+    /**
+     * 查询图书的详情  -- 根据id查询图书的详情
+     * @param bookId
+     * @return
+     */
+    Book getBookByBookId(Integer bookId);
+
+    /**
+     * 查询图书的列表
+     * @return
+     */
+    List<Book> getList();
+
+
+    /**
+     * 根据图书的名称进行模糊查询
+     * @param bookName
+     * @return
+     */
+    List<Book> getBookWithLike(String bookName);
+}

+ 58 - 0
SSM/src/main/java/com/sf/service/BookService.java

@@ -0,0 +1,58 @@
+package com.sf.service;
+
+import com.sf.entity.Book;
+
+import java.util.List;
+
+/**
+ * book图书的service层接口
+ */
+
+public interface BookService {
+    /**
+     * 添加图书
+     * @param book
+     */
+    void addBook(Book book);
+
+    /**
+     * 编辑图书
+     * @param book
+     */
+    void updateBook(Book book);
+
+    /**
+     * 删除图书
+     * @param bookId
+     */
+    void deleteBook(Integer bookId);
+
+    /**
+     * 根据图书的id去获取图书的详情
+     * @param bookId
+     * @return
+     */
+    Book getBookByBookId(Integer bookId);
+
+    /**
+     * 查询图书的列表
+     * @return
+     */
+    List<Book> getList();
+
+    /**
+     * 根据图书名称进行模糊查询
+     * @param bookName
+     * @return
+     */
+    List<Book> getBookWithLike(String bookName);
+
+
+    /**
+     * 图书查询分页
+     * @param pageNo
+     * @param pageSize
+     * @return
+     */
+    List<Book> getBookWithPage(Integer pageNo,Integer pageSize);
+}

+ 96 - 0
SSM/src/main/java/com/sf/service/impl/BookServiceImpl.java

@@ -0,0 +1,96 @@
+package com.sf.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.sf.entity.Book;
+import com.sf.mapper.BookMapper;
+import com.sf.service.BookService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Service
+@Transactional
+public class BookServiceImpl implements BookService {
+    /**
+     * 资源注入  - bookMapper
+     */
+    @Autowired
+    private BookMapper bookMapper;
+
+    /**
+     *添加图书
+     * @param book
+     */
+    @Override
+    public void addBook(Book book) {
+        bookMapper.addBook(book);
+    }
+
+    /**
+     * 修改图书
+     * @param book
+     */
+    @Override
+    public void updateBook(Book book) {
+        bookMapper.updateBook(book);
+    }
+
+    /**
+     * 根据图书的id去删除图书
+     * @param bookId
+     */
+    @Override
+    public void deleteBook(Integer bookId) {
+        bookMapper.deleteBook(bookId);
+    }
+
+    /**
+     * 根据图书的id去查询图书的详情
+     * @param bookId
+     * @return
+     */
+    @Override
+    public Book getBookByBookId(Integer bookId) {
+        return bookMapper.getBookByBookId(bookId);
+    }
+
+    /**
+     * 查询图书的列表
+     * @return
+     */
+    @Override
+    public List<Book> getList() {
+        return bookMapper.getList();
+    }
+
+    /**
+     * 根据图书的名称进行迷糊查询
+     * @param bookName
+     * @return
+     */
+    @Override
+    public List<Book> getBookWithLike(String bookName) {
+        return bookMapper.getBookWithLike(bookName);
+    }
+
+    /**
+     * 图书的分页查询
+     * @param pageNo
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public List<Book> getBookWithPage(Integer pageNo, Integer pageSize) {
+        System.out.println("----"+pageNo);
+        System.out.println("==="+pageSize);
+        PageHelper.startPage(pageNo, pageSize);
+        List<Book> list = bookMapper.getList();
+        PageInfo<Book> bookPageInfo = new PageInfo<>(list);
+        System.out.println(bookPageInfo.getList());
+        return bookPageInfo.getList();
+    }
+}

+ 60 - 0
SSM/src/main/resources/applicationContext.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
+		http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd
+		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
+
+    <!--扫描需要扫描的包-->
+    <context:component-scan base-package="com.sf"></context:component-scan>
+    <!--导入外部属性资源文件 db.properties-->
+    <context:property-placeholder location="classpath:db.properties"></context:property-placeholder>
+    <!--配置数据库连接池-->
+    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+        <property name="url" value="${jdbc_url}" />
+        <property name="username" value="${jdbc_user}" />
+        <property name="password" value="${jdbc_password}" />
+        <property name="filters" value="stat" />
+        <property name="maxActive" value="20" />
+        <property name="initialSize" value="1" />
+        <property name="maxWait" value="60000" />
+        <property name="minIdle" value="1" />
+        <property name="timeBetweenEvictionRunsMillis" value="60000" />
+        <property name="minEvictableIdleTimeMillis" value="300000" />
+        <property name="testWhileIdle" value="true" />
+        <property name="testOnBorrow" value="false" />
+        <property name="testOnReturn" value="false" />
+        <property name="poolPreparedStatements" value="true" />
+        <property name="maxOpenPreparedStatements" value="20" />
+        <property name="asyncInit" value="true" />
+    </bean>
+
+    <!--sqlSessionFactory-->
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSource"/>
+        <!--mybatis核心配置-->
+        <property name="configLocation" value="classpath:mybatis-config.xml"></property>
+        <!--SQL MAP -->
+        <property name="mapperLocations" value="classpath:mapper/*.xml"></property>
+        <!--别名-->
+        <property name="typeAliasesPackage" value="com.sf.entity"></property>
+    </bean>
+
+    <!--配置平台事务管理器-->
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="dataSource"/>
+    </bean>
+    <!--将mybatis 接口加入到IOC中-->
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
+        <property name="basePackage" value="com.sf.mapper"></property>
+    </bean>
+    <!--开启基于注解的声明式事物-->
+    <tx:annotation-driven transaction-manager="transactionManager"></tx:annotation-driven>
+</beans>

+ 3 - 0
SSM/src/main/resources/db.properties

@@ -0,0 +1,3 @@
+jdbc_user=root
+jdbc_password=root
+jdbc_url=jdbc:mysql://127.0.0.1:3306/mybatis?characterEncoding=utf-8&useUnicode=true

+ 36 - 0
SSM/src/main/resources/mapper/BookMapper.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sf.mapper.BookMapper">
+
+<!--    图书的添加-->
+    <insert id="addBook" parameterType="book">
+        insert into book(book_id,book_name,author_name,price) values (#{bookId},#{bookName},#{authorName},#{price})
+    </insert>
+
+    <update id="updateBook" parameterType="book">
+        update book set
+        <if test="bookName != null">book_name = #{bookName},</if>
+        <if test="authorName != null">author_name = #{authorName},</if>
+        <if test="price != null">price = #{price}</if>
+    where book_id = #{bookId}
+    </update>
+
+    <delete id="deleteBook" parameterType="int">
+        delete from book where book_id = #{bookId}
+    </delete>
+
+    <select id="getBookByBookId" parameterType="int" resultType="book">
+        select * from book where book_id = #{bookId}
+    </select>
+
+    <select id="getList" resultType="book">
+        select * from book
+    </select>
+
+    <select id="getBookWithLike" resultType="book" parameterType="string">
+        select * from book where book_name like concat('%',#{bookName},'%');
+    </select>
+
+</mapper>

+ 15 - 0
SSM/src/main/resources/mybatis-config.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <settings>
+        <!--驼峰命名-->
+        <setting name="mapUnderscoreToCamelCase" value="true"/>
+    </settings>
+
+    <!--    配置分页插件-->
+    <plugins>
+        <plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin>
+    </plugins>
+</configuration>

+ 11 - 0
SSM/src/main/resources/步骤

@@ -0,0 +1,11 @@
+1.创建映射数据库的实体类entity包里的Book
+2.写接口,按照需求编写接口  mapper -- BookMapper
+3.去编写BookMapper.xml   - resources  BookMapper.xml
+4.编写service层接口,impl  service层接口的实现类
+    ps:在service实现类上加@service注解  添加事务注解
+        serviceImpl调用dao层进行资源注入
+        @AutoWired
+        private BookMapper bookMapper;
+5.编写controller层
+    作用:调用service层      service --- mapper
+         接受浏览器请求的参数

+ 27 - 0
SSM/src/main/webapp/WEB-INF/springDispatcherServlet-servlet.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mvc="http://www.springframework.org/schema/mvc"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
+		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd">
+    <!--配置扫描的包-->
+    <context:component-scan base-package="com.sf"></context:component-scan>
+    <!--配置通用视图解析器-->
+    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+        <!--前缀-->
+        <property name="prefix" value="/WEB-INF/views/"></property>
+        <!--后缀-->
+        <property name="suffix" value=".jsp"></property>
+    </bean>
+    <!--静态资源导入-->
+    <mvc:default-servlet-handler></mvc:default-servlet-handler>
+    <!--注解模式-->
+    <mvc:annotation-driven>
+        <mvc:message-converters>
+            <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
+            <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
+        </mvc:message-converters>
+    </mvc:annotation-driven>
+</beans>

+ 26 - 0
SSM/src/main/webapp/WEB-INF/web.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         version="2.5">
+
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>classpath:applicationContext.xml</param-value>
+    </context-param>
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>springDispatcherServlet</servlet-name>
+        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+    </servlet>
+
+    <!-- Map all requests to the DispatcherServlet for handling -->
+    <servlet-mapping>
+        <servlet-name>springDispatcherServlet</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+
+</web-app>

+ 5 - 0
SSM/src/main/webapp/index.jsp

@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

TEMPAT SAMPAH
SSM/target/SSM.war


+ 5 - 0
SSM/target/SSM/META-INF/MANIFEST.MF

@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Created-By: IntelliJ IDEA
+Built-By: Lenovo
+Build-Jdk: 1.8.0_171
+

+ 60 - 0
SSM/target/SSM/WEB-INF/classes/applicationContext.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
+		http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd
+		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
+
+    <!--扫描需要扫描的包-->
+    <context:component-scan base-package="com.sf"></context:component-scan>
+    <!--导入外部属性资源文件 db.properties-->
+    <context:property-placeholder location="classpath:db.properties"></context:property-placeholder>
+    <!--配置数据库连接池-->
+    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+        <property name="url" value="${jdbc_url}" />
+        <property name="username" value="${jdbc_user}" />
+        <property name="password" value="${jdbc_password}" />
+        <property name="filters" value="stat" />
+        <property name="maxActive" value="20" />
+        <property name="initialSize" value="1" />
+        <property name="maxWait" value="60000" />
+        <property name="minIdle" value="1" />
+        <property name="timeBetweenEvictionRunsMillis" value="60000" />
+        <property name="minEvictableIdleTimeMillis" value="300000" />
+        <property name="testWhileIdle" value="true" />
+        <property name="testOnBorrow" value="false" />
+        <property name="testOnReturn" value="false" />
+        <property name="poolPreparedStatements" value="true" />
+        <property name="maxOpenPreparedStatements" value="20" />
+        <property name="asyncInit" value="true" />
+    </bean>
+
+    <!--sqlSessionFactory-->
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSource"/>
+        <!--mybatis核心配置-->
+        <property name="configLocation" value="classpath:mybatis-config.xml"></property>
+        <!--SQL MAP -->
+        <property name="mapperLocations" value="classpath:mapper/*.xml"></property>
+        <!--别名-->
+        <property name="typeAliasesPackage" value="com.sf.entity"></property>
+    </bean>
+
+    <!--配置平台事务管理器-->
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="dataSource"/>
+    </bean>
+    <!--将mybatis 接口加入到IOC中-->
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
+        <property name="basePackage" value="com.sf.mapper"></property>
+    </bean>
+    <!--开启基于注解的声明式事物-->
+    <tx:annotation-driven transaction-manager="transactionManager"></tx:annotation-driven>
+</beans>

TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/classes/com/sf/controller/BookController.class


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/classes/com/sf/dto/Result.class


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/classes/com/sf/entity/Book.class


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/classes/com/sf/mapper/BookMapper.class


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/classes/com/sf/service/BookService.class


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/classes/com/sf/service/impl/BookServiceImpl.class


+ 3 - 0
SSM/target/SSM/WEB-INF/classes/db.properties

@@ -0,0 +1,3 @@
+jdbc_user=root
+jdbc_password=root
+jdbc_url=jdbc:mysql://127.0.0.1:3306/mybatis?characterEncoding=utf-8&useUnicode=true

+ 36 - 0
SSM/target/SSM/WEB-INF/classes/mapper/BookMapper.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sf.mapper.BookMapper">
+
+<!--    图书的添加-->
+    <insert id="addBook" parameterType="book">
+        insert into book(book_id,book_name,author_name,price) values (#{bookId},#{bookName},#{authorName},#{price})
+    </insert>
+
+    <update id="updateBook" parameterType="book">
+        update book set
+        <if test="bookName != null">book_name = #{bookName},</if>
+        <if test="authorName != null">author_name = #{authorName},</if>
+        <if test="price != null">price = #{price}</if>
+    where book_id = #{bookId}
+    </update>
+
+    <delete id="deleteBook" parameterType="int">
+        delete from book where book_id = #{bookId}
+    </delete>
+
+    <select id="getBookByBookId" parameterType="int" resultType="book">
+        select * from book where book_id = #{bookId}
+    </select>
+
+    <select id="getList" resultType="book">
+        select * from book
+    </select>
+
+    <select id="getBookWithLike" resultType="book" parameterType="string">
+        select * from book where book_name like concat('%',#{bookName},'%');
+    </select>
+
+</mapper>

+ 15 - 0
SSM/target/SSM/WEB-INF/classes/mybatis-config.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <settings>
+        <!--驼峰命名-->
+        <setting name="mapUnderscoreToCamelCase" value="true"/>
+    </settings>
+
+    <!--    配置分页插件-->
+    <plugins>
+        <plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin>
+    </plugins>
+</configuration>

+ 11 - 0
SSM/target/SSM/WEB-INF/classes/步骤

@@ -0,0 +1,11 @@
+1.创建映射数据库的实体类entity包里的Book
+2.写接口,按照需求编写接口  mapper -- BookMapper
+3.去编写BookMapper.xml   - resources  BookMapper.xml
+4.编写service层接口,impl  service层接口的实现类
+    ps:在service实现类上加@service注解  添加事务注解
+        serviceImpl调用dao层进行资源注入
+        @AutoWired
+        private BookMapper bookMapper;
+5.编写controller层
+    作用:调用service层      service --- mapper
+         接受浏览器请求的参数

TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/activation-1.1.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/aspectjweaver-1.8.9.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/commons-logging-1.2.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/druid-1.1.6.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/jackson-annotations-2.5.0.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/jackson-core-2.5.4.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/jackson-databind-2.5.4.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/javaee-api-7.0.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/javax.mail-1.5.0.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/jsp-api-2.1.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/jsqlparser-1.0.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/jstl-api-1.2.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/jstl-impl-1.2.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/mybatis-3.4.6.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/mybatis-spring-1.3.2.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/mysql-connector-java-5.1.46.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/pagehelper-5.1.2.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/servlet-api-2.5.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-aop-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-aspects-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-beans-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-context-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-context-support-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-core-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-expression-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-jdbc-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-orm-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-test-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-tx-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-web-4.3.27.RELEASE.jar


TEMPAT SAMPAH
SSM/target/SSM/WEB-INF/lib/spring-webmvc-4.3.27.RELEASE.jar


+ 27 - 0
SSM/target/SSM/WEB-INF/springDispatcherServlet-servlet.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mvc="http://www.springframework.org/schema/mvc"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
+		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd">
+    <!--配置扫描的包-->
+    <context:component-scan base-package="com.sf"></context:component-scan>
+    <!--配置通用视图解析器-->
+    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+        <!--前缀-->
+        <property name="prefix" value="/WEB-INF/views/"></property>
+        <!--后缀-->
+        <property name="suffix" value=".jsp"></property>
+    </bean>
+    <!--静态资源导入-->
+    <mvc:default-servlet-handler></mvc:default-servlet-handler>
+    <!--注解模式-->
+    <mvc:annotation-driven>
+        <mvc:message-converters>
+            <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
+            <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
+        </mvc:message-converters>
+    </mvc:annotation-driven>
+</beans>

+ 26 - 0
SSM/target/SSM/WEB-INF/web.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         version="2.5">
+
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>classpath:applicationContext.xml</param-value>
+    </context-param>
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>springDispatcherServlet</servlet-name>
+        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+    </servlet>
+
+    <!-- Map all requests to the DispatcherServlet for handling -->
+    <servlet-mapping>
+        <servlet-name>springDispatcherServlet</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+
+</web-app>

+ 5 - 0
SSM/target/SSM/index.jsp

@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

+ 60 - 0
SSM/target/classes/applicationContext.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
+		http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd
+		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
+
+    <!--扫描需要扫描的包-->
+    <context:component-scan base-package="com.sf"></context:component-scan>
+    <!--导入外部属性资源文件 db.properties-->
+    <context:property-placeholder location="classpath:db.properties"></context:property-placeholder>
+    <!--配置数据库连接池-->
+    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+        <property name="url" value="${jdbc_url}" />
+        <property name="username" value="${jdbc_user}" />
+        <property name="password" value="${jdbc_password}" />
+        <property name="filters" value="stat" />
+        <property name="maxActive" value="20" />
+        <property name="initialSize" value="1" />
+        <property name="maxWait" value="60000" />
+        <property name="minIdle" value="1" />
+        <property name="timeBetweenEvictionRunsMillis" value="60000" />
+        <property name="minEvictableIdleTimeMillis" value="300000" />
+        <property name="testWhileIdle" value="true" />
+        <property name="testOnBorrow" value="false" />
+        <property name="testOnReturn" value="false" />
+        <property name="poolPreparedStatements" value="true" />
+        <property name="maxOpenPreparedStatements" value="20" />
+        <property name="asyncInit" value="true" />
+    </bean>
+
+    <!--sqlSessionFactory-->
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSource"/>
+        <!--mybatis核心配置-->
+        <property name="configLocation" value="classpath:mybatis-config.xml"></property>
+        <!--SQL MAP -->
+        <property name="mapperLocations" value="classpath:mapper/*.xml"></property>
+        <!--别名-->
+        <property name="typeAliasesPackage" value="com.sf.entity"></property>
+    </bean>
+
+    <!--配置平台事务管理器-->
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="dataSource"/>
+    </bean>
+    <!--将mybatis 接口加入到IOC中-->
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
+        <property name="basePackage" value="com.sf.mapper"></property>
+    </bean>
+    <!--开启基于注解的声明式事物-->
+    <tx:annotation-driven transaction-manager="transactionManager"></tx:annotation-driven>
+</beans>

TEMPAT SAMPAH
SSM/target/classes/com/sf/controller/BookController.class


TEMPAT SAMPAH
SSM/target/classes/com/sf/dto/Result.class


TEMPAT SAMPAH
SSM/target/classes/com/sf/entity/Book.class


TEMPAT SAMPAH
SSM/target/classes/com/sf/mapper/BookMapper.class


TEMPAT SAMPAH
SSM/target/classes/com/sf/service/BookService.class


TEMPAT SAMPAH
SSM/target/classes/com/sf/service/impl/BookServiceImpl.class


+ 3 - 0
SSM/target/classes/db.properties

@@ -0,0 +1,3 @@
+jdbc_user=root
+jdbc_password=root
+jdbc_url=jdbc:mysql://127.0.0.1:3306/mybatis?characterEncoding=utf-8&useUnicode=true

+ 36 - 0
SSM/target/classes/mapper/BookMapper.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sf.mapper.BookMapper">
+
+<!--    图书的添加-->
+    <insert id="addBook" parameterType="book">
+        insert into book(book_id,book_name,author_name,price) values (#{bookId},#{bookName},#{authorName},#{price})
+    </insert>
+
+    <update id="updateBook" parameterType="book">
+        update book set
+        <if test="bookName != null">book_name = #{bookName},</if>
+        <if test="authorName != null">author_name = #{authorName},</if>
+        <if test="price != null">price = #{price}</if>
+    where book_id = #{bookId}
+    </update>
+
+    <delete id="deleteBook" parameterType="int">
+        delete from book where book_id = #{bookId}
+    </delete>
+
+    <select id="getBookByBookId" parameterType="int" resultType="book">
+        select * from book where book_id = #{bookId}
+    </select>
+
+    <select id="getList" resultType="book">
+        select * from book
+    </select>
+
+    <select id="getBookWithLike" resultType="book" parameterType="string">
+        select * from book where book_name like concat('%',#{bookName},'%');
+    </select>
+
+</mapper>

+ 15 - 0
SSM/target/classes/mybatis-config.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <settings>
+        <!--驼峰命名-->
+        <setting name="mapUnderscoreToCamelCase" value="true"/>
+    </settings>
+
+    <!--    配置分页插件-->
+    <plugins>
+        <plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin>
+    </plugins>
+</configuration>

+ 11 - 0
SSM/target/classes/步骤

@@ -0,0 +1,11 @@
+1.创建映射数据库的实体类entity包里的Book
+2.写接口,按照需求编写接口  mapper -- BookMapper
+3.去编写BookMapper.xml   - resources  BookMapper.xml
+4.编写service层接口,impl  service层接口的实现类
+    ps:在service实现类上加@service注解  添加事务注解
+        serviceImpl调用dao层进行资源注入
+        @AutoWired
+        private BookMapper bookMapper;
+5.编写controller层
+    作用:调用service层      service --- mapper
+         接受浏览器请求的参数

+ 26 - 9
springmvc/.idea/workspace.xml

@@ -10,15 +10,28 @@
   </component>
   </component>
   <component name="ChangeListManager">
   <component name="ChangeListManager">
     <list default="true" id="32ba8696-e546-42f9-8a17-6935ed145529" name="Changes" comment="">
     <list default="true" id="32ba8696-e546-42f9-8a17-6935ed145529" name="Changes" comment="">
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/sf/conroller/User.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/sf/conroller/UserController.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/.idea/compiler.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/.idea/encodings.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/.idea/jarRepositories.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/.idea/misc.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/.idea/vcs.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/.idea/workspace.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/pom.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/src/main/resources/applicationContext.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/src/main/resources/db.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/src/main/resources/mybatis-config.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/src/main/webapp/WEB-INF/springDispatcherServlet.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/src/main/webapp/WEB-INF/web.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/src/main/webapp/index.jsp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/target/SSM.war" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/target/SSM/META-INF/MANIFEST.MF" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/target/SSM/WEB-INF/web.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/target/SSM/index.jsp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/target/classes/applicationContext.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/target/classes/db.properties" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../SSM/target/classes/mybatis-config.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../04maven/spring/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../04maven/spring/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/sf/conroller/BookController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/sf/conroller/BookController.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/com/sf/conroller/BookController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/sf/conroller/BookController.class" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/springmvc.war" beforeDir="false" afterPath="$PROJECT_DIR$/target/springmvc.war" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/springmvc/WEB-INF/classes/com/sf/conroller/BookController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/springmvc/WEB-INF/classes/com/sf/conroller/BookController.class" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/springmvc/WEB-INF/dispatcherServlet-servlet.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/springmvc/WEB-INF/dispatcherServlet-servlet.xml" afterDir="false" />
     </list>
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -56,6 +69,7 @@
   </component>
   </component>
   <component name="PropertiesComponent"><![CDATA[{
   <component name="PropertiesComponent"><![CDATA[{
   "keyToString": {
   "keyToString": {
+    "ASKED_ADD_EXTERNAL_FILES": "true",
     "RunOnceActivity.OpenProjectViewOnStart": "true",
     "RunOnceActivity.OpenProjectViewOnStart": "true",
     "RunOnceActivity.ShowReadmeOnStart": "true",
     "RunOnceActivity.ShowReadmeOnStart": "true",
     "SHARE_PROJECT_CONFIGURATION_FILES": "true",
     "SHARE_PROJECT_CONFIGURATION_FILES": "true",
@@ -163,11 +177,14 @@
       <option name="presentableId" value="Default" />
       <option name="presentableId" value="Default" />
       <updated>1690439501381</updated>
       <updated>1690439501381</updated>
       <workItem from="1690439502870" duration="24084000" />
       <workItem from="1690439502870" duration="24084000" />
-      <workItem from="1690525438535" duration="43643000" />
+      <workItem from="1690525438535" duration="46823000" />
     </task>
     </task>
     <servers />
     <servers />
   </component>
   </component>
   <component name="TypeScriptGeneratedFilesManager">
   <component name="TypeScriptGeneratedFilesManager">
     <option name="version" value="3" />
     <option name="version" value="3" />
   </component>
   </component>
+  <component name="VcsManagerConfiguration">
+    <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
+  </component>
 </project>
 </project>