首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

Java Web实验 Spring架构的实现

前端 24.59MB 0 需要积分: 1
立即下载

资源介绍:

Java Web项目初步学习
package com.controller; import com.dao.UserDao; import com.dao.UserDaoImpl; import com.entity.User; import com.service.UserService; import com.service.UserServiceImpl; import org.springframework.context.ApplicationContext; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.sql.SQLException; import java.util.List; public class UserController extends HttpServlet{ private UserService userService; @Override public void init()throws ServletException{ //使用WebApplicationContextUtils 获取Spring容器 ApplicationContext context= WebApplicationContextUtils.getWebApplicationContext(getServletContext()); userService=(UserService)context.getBean("userService"); } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); try{ if("query".equals(action)){ queryUsers(request, response); } else if ("add".equals(action)) { addUser(request, response); } else if ("delete".equals(action)) { deleteUser(request, response); } else if ("update".equals(action)) { updateUser(request, response); } } catch (SQLException e) { e.printStackTrace(); response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,"Database error"); } } @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.doPost(req, resp); } private void addUser(HttpServletRequest request, HttpServletResponse response) throws IOException, SQLException, ServletException { int id= Integer.parseInt(request.getParameter("id")); String username=request.getParameter("username"); String pwd=request.getParameter("pwd"); userService.addUser(id,username,pwd); request.getRequestDispatcher("/user.jsp").forward(request, response); response.sendRedirect("user?action=query"); } private void queryUsers(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException { List users = userService.getAllUsers(); request.setAttribute("users", users); request.getRequestDispatcher("/user.jsp").forward(request, response); } private void deleteUser(HttpServletRequest request, HttpServletResponse response) throws IOException, SQLException, ServletException, ServletException { String id = request.getParameter("id"); userService.deleteUser(id); request.getRequestDispatcher("/user.jsp").forward(request, response); response.sendRedirect("user?action=query"); } private void updateUser(HttpServletRequest request, HttpServletResponse response) throws IOException, SQLException, ServletException { int id = Integer.parseInt(request.getParameter("id")); String username = request.getParameter("username"); String pwd = request.getParameter("pwd"); userService.updateUser(id, username, pwd); request.getRequestDispatcher("/user.jsp").forward(request, response); response.sendRedirect("user?action=query"); } }

资源文件列表:

bmms_spring.zip 大约有149个文件
  1. bmms_spring/
  2. bmms_spring/.gitignore 490B
  3. bmms_spring/.idea/
  4. bmms_spring/.idea/.gitignore 190B
  5. bmms_spring/.idea/compiler.xml 544B
  6. bmms_spring/.idea/encodings.xml 438B
  7. bmms_spring/.idea/jarRepositories.xml 1.08KB
  8. bmms_spring/.idea/libraries/
  9. bmms_spring/.idea/libraries/commons_dbcp_1_4.xml 980B
  10. bmms_spring/.idea/misc.xml 539B
  11. bmms_spring/.idea/workspace.xml 10.5KB
  12. bmms_spring/pom.xml 744B
  13. bmms_spring/spring_demo/
  14. bmms_spring/spring_demo/pom.xml 5.62KB
  15. bmms_spring/spring_demo/src/
  16. bmms_spring/spring_demo/src/main/
  17. bmms_spring/spring_demo/src/main/java/
  18. bmms_spring/spring_demo/src/main/java/aop/
  19. bmms_spring/spring_demo/src/main/java/aop/LoggingAspect.java 957B
  20. bmms_spring/spring_demo/src/main/java/com/
  21. bmms_spring/spring_demo/src/main/java/com/controller/
  22. bmms_spring/spring_demo/src/main/java/com/controller/UserController.java 3.63KB
  23. bmms_spring/spring_demo/src/main/java/com/dao/
  24. bmms_spring/spring_demo/src/main/java/com/dao/UserDao.java 392B
  25. bmms_spring/spring_demo/src/main/java/com/dao/UserDaoImpl.java 1.25KB
  26. bmms_spring/spring_demo/src/main/java/com/entity/
  27. bmms_spring/spring_demo/src/main/java/com/entity/User.java 703B
  28. bmms_spring/spring_demo/src/main/java/com/service/
  29. bmms_spring/spring_demo/src/main/java/com/service/UserService.java 430B
  30. bmms_spring/spring_demo/src/main/java/com/service/UserServiceImpl.java 846B
  31. bmms_spring/spring_demo/src/main/resources/
  32. bmms_spring/spring_demo/src/main/resources/applicationContext.xml 1.58KB
  33. bmms_spring/spring_demo/src/main/resources/db.properties 128B
  34. bmms_spring/spring_demo/src/main/test/
  35. bmms_spring/spring_demo/src/main/test/java/
  36. bmms_spring/spring_demo/src/main/webapp/
  37. bmms_spring/spring_demo/src/main/webapp/index.jsp 57B
  38. bmms_spring/spring_demo/src/main/webapp/user.jsp 2.29KB
  39. bmms_spring/spring_demo/src/main/webapp/WEB-INF/
  40. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/
  41. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/commons-dbcp-1.4.jar 156.76KB
  42. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/commons-pool-1.6.jar 108.51KB
  43. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/hamcrest-core-1.3.jar 43.97KB
  44. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/jsp-api.jar 72.18KB
  45. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/jstl-1.2.jar 404.53KB
  46. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/junit-4.12.jar 307.55KB
  47. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/mysql-connector-java-5.1.47.jar 983.89KB
  48. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/servlet-api.jar 278.93KB
  49. bmms_spring/spring_demo/src/main/webapp/WEB-INF/lib/standard-1.1.2.jar 384.04KB
  50. bmms_spring/spring_demo/src/main/webapp/WEB-INF/web.xml 913B
  51. bmms_spring/spring_demo/src/test/
  52. bmms_spring/spring_demo/src/test/java/
  53. bmms_spring/spring_demo/src/test/java/com/
  54. bmms_spring/spring_demo/src/test/java/com/controller/
  55. bmms_spring/spring_demo/src/test/java/com/controller/UserControllerTest.java 265B
  56. bmms_spring/spring_demo/src/test/java/com/dao/
  57. bmms_spring/spring_demo/src/test/java/com/dao/UserDaoImplTest.java 892B
  58. bmms_spring/spring_demo/target/
  59. bmms_spring/spring_demo/target/classes/
  60. bmms_spring/spring_demo/target/classes/aop/
  61. bmms_spring/spring_demo/target/classes/aop/LoggingAspect.class 1.8KB
  62. bmms_spring/spring_demo/target/classes/applicationContext.xml 1.58KB
  63. bmms_spring/spring_demo/target/classes/com/
  64. bmms_spring/spring_demo/target/classes/com/controller/
  65. bmms_spring/spring_demo/target/classes/com/controller/UserController.class 3.55KB
  66. bmms_spring/spring_demo/target/classes/com/dao/
  67. bmms_spring/spring_demo/target/classes/com/dao/UserDao.class 413B
  68. bmms_spring/spring_demo/target/classes/com/dao/UserDaoImpl.class 1.83KB
  69. bmms_spring/spring_demo/target/classes/com/entity/
  70. bmms_spring/spring_demo/target/classes/com/entity/User.class 1.04KB
  71. bmms_spring/spring_demo/target/classes/com/service/
  72. bmms_spring/spring_demo/target/classes/com/service/UserService.class 425B
  73. bmms_spring/spring_demo/target/classes/com/service/UserServiceImpl.class 1.2KB
  74. bmms_spring/spring_demo/target/classes/db.properties 128B
  75. bmms_spring/spring_demo/target/generated-sources/
  76. bmms_spring/spring_demo/target/generated-sources/annotations/
  77. bmms_spring/spring_demo/target/generated-test-sources/
  78. bmms_spring/spring_demo/target/generated-test-sources/test-annotations/
  79. bmms_spring/spring_demo/target/maven-archiver/
  80. bmms_spring/spring_demo/target/maven-archiver/pom.properties 62B
  81. bmms_spring/spring_demo/target/maven-status/
  82. bmms_spring/spring_demo/target/maven-status/maven-compiler-plugin/
  83. bmms_spring/spring_demo/target/maven-status/maven-compiler-plugin/compile/
  84. bmms_spring/spring_demo/target/maven-status/maven-compiler-plugin/compile/default-compile/
  85. bmms_spring/spring_demo/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst 170B
  86. bmms_spring/spring_demo/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst 590B
  87. bmms_spring/spring_demo/target/spring_demo/
  88. bmms_spring/spring_demo/target/spring_demo/index.jsp 57B
  89. bmms_spring/spring_demo/target/spring_demo/META-INF/
  90. bmms_spring/spring_demo/target/spring_demo/META-INF/MANIFEST.MF 103B
  91. bmms_spring/spring_demo/target/spring_demo/user.jsp 2.29KB
  92. bmms_spring/spring_demo/target/spring_demo/WEB-INF/
  93. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/
  94. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/aop/
  95. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/aop/LoggingAspect.class 1.8KB
  96. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/applicationContext.xml 1.58KB
  97. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/
  98. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/controller/
  99. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/controller/UseController.class 294B
  100. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/controller/UserController.class 3.55KB
  101. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/dao/
  102. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/dao/UserDao.class 413B
  103. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/dao/UserDaoImpl.class 1.83KB
  104. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/entity/
  105. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/entity/User.class 1.04KB
  106. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/service/
  107. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/service/UserService.class 425B
  108. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/com/service/UserServiceImpl.class 1.2KB
  109. bmms_spring/spring_demo/target/spring_demo/WEB-INF/classes/db.properties 128B
  110. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/
  111. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/aspectjweaver-1.9.7.jar 1.99MB
  112. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/commons-dbcp-1.4.jar 156.76KB
  113. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/commons-pool-1.5.4.jar 93.97KB
  114. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/commons-pool-1.6.jar 108.51KB
  115. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/hamcrest-core-1.3.jar 43.97KB
  116. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/jsp-api.jar 72.18KB
  117. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/jstl-1.2.jar 404.53KB
  118. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/junit-4.12.jar 307.55KB
  119. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/logback-classic-1.2.3.jar 283.53KB
  120. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/logback-core-1.2.3.jar 460.84KB
  121. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/mysql-connector-java-5.1.47.jar 983.89KB
  122. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/mysql-connector-java-8.0.28.jar 2.36MB
  123. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/protobuf-java-3.11.4.jar 1.58MB
  124. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/servlet-api.jar 278.93KB
  125. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/slf4j-api-1.7.30.jar 40.5KB
  126. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-aop-5.3.10.jar 373.25KB
  127. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-beans-5.3.15.jar 681.08KB
  128. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-context-5.3.15.jar 1.21MB
  129. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-core-5.3.15.jar 1.41MB
  130. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-expression-5.3.15.jar 282.02KB
  131. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-jcl-5.3.15.jar 23.87KB
  132. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-jdbc-6.1.8.jar 456.38KB
  133. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-test-5.1.4.RELEASE.jar 604.43KB
  134. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-tx-6.1.8.jar 278.28KB
  135. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-web-5.3.15.jar 1.56MB
  136. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/spring-webmvc-5.3.15.jar 1004.33KB
  137. bmms_spring/spring_demo/target/spring_demo/WEB-INF/lib/standard-1.1.2.jar 384.04KB
  138. bmms_spring/spring_demo/target/spring_demo/WEB-INF/web.xml 913B
  139. bmms_spring/spring_demo/target/spring_demo.war 6.28MB
  140. bmms_spring/spring_demo/target/test-classes/
  141. bmms_spring/spring_demo/target/test-classes/com/
  142. bmms_spring/spring_demo/target/test-classes/com/controller/
  143. bmms_spring/spring_demo/target/test-classes/com/controller/UserControllerTest.class 587B
  144. bmms_spring/spring_demo/target/test-classes/com/dao/
  145. bmms_spring/spring_demo/target/test-classes/com/dao/UserDaoImplTest.class 1.78KB
  146. bmms_spring/spring_demo/web/
  147. bmms_spring/spring_demo/web/index.jsp 306B
  148. bmms_spring/spring_demo/web/WEB-INF/
  149. bmms_spring/spring_demo/web/WEB-INF/web.xml 304B
0评论
提交 加载更多评论
其他资源 第三周板书(1).zip
第三周板书(1).zip
Java Web 实验项目 初步实现maven和idea的整合
Java Web 实验项目 初步实现maven和idea的整合
springboot基于SpringBoot的旅游网站的设计与实现
摘 要 随着科学技术的飞速发展,各行各业都在努力与现代先进技术接轨,通过科技手段提高自身的优势,旅游网站当然也不能排除在外,随着旅游网站的不断成熟,它彻底改变了过去传统的旅游网站方式,不仅使旅游管理难度变低了,还提升了旅游网站的灵活性。这种个性化的旅游网站特别注重交互协调经营与管理的相互配合,激发了管理人员的创造性与主动性,对旅游管理的管理而言非常有利。 本文首先分析了旅游网站的发展背景和意义,简要阐述了旅游网站系统开发的主要内容和优势,然后简要介绍了国内外旅游网站系统的研究和应用现状,并对系统开发技术,系统分析和总体设计,实现详细功能等。 本旅游网站系统采用的数据库是MYSQL,使用JSP技术开发,在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。 关键词:旅游网站;JSP;MYSQL 数据库
springboot校园管理系统的设计与实现
摘  要 随着科学技术的飞速发展,社会的方方面面、各行各业都在努力与现代的先进技术接轨,通过科技手段来提高自身的优势,校园管理系统当然也不能排除在外。校园管理系统是以实际运用为开发背景,运用软件工程原理和开发方法,采用springboot框架构建的一个管理系统。整个开发过程首先对软件系统进行需求分析,得出系统的主要功能。接着对系统进行总体设计和详细设计。总体设计主要包括系统功能设计、系统总体结构设计、系统数据结构设计和系统安全设计等;详细设计主要包括系统数据库访问的实现,主要功能模块的具体实现,模块实现关键代码等。最后对系统进行功能测试,并对测试结果进行分析总结,得出系统中存在的不足及需要改进的地方,为以后的系统维护提供了方便,同时也为今后开发类似系统提供了借鉴和帮助。这种个性化的网上校园管理系统特别注重交互协调与管理的相互配合,激发了管理人员的创造性与主动性,对校园管理系统而言非常有利。 本校园管理系统采用的数据库是Mysql,使用springboot框架开发。在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。
在线投稿系统 SSM毕业设计 附带论文.zip
在线投稿系统 SSM毕业设计 附带论文 启动教程:https://www.bilibili.com/video/BV1GK1iYyE2B
在线投稿系统 SSM毕业设计 附带论文.zip
智能仓储系统 SSM毕业设计 附带论文.zip
智能仓储系统 SSM毕业设计 附带论文 启动教程:https://www.bilibili.com/video/BV1GK1iYyE2B
星火许电影小说网站 SSM毕业设计 附带论文.zip
星火许电影小说网站 SSM毕业设计 附带论文 启动教程:https://www.bilibili.com/video/BV1GK1iYyE2B
星火许电影小说网站 SSM毕业设计 附带论文.zip 星火许电影小说网站 SSM毕业设计 附带论文.zip 星火许电影小说网站 SSM毕业设计 附带论文.zip
忘忧小区物业管理系统 SSM毕业设计 附带论文.zip
忘忧小区物业管理系统 SSM毕业设计 附带论文 启动教程:https://www.bilibili.com/video/BV1GK1iYyE2B
忘忧小区物业管理系统 SSM毕业设计 附带论文.zip 忘忧小区物业管理系统 SSM毕业设计 附带论文.zip 忘忧小区物业管理系统 SSM毕业设计 附带论文.zip