当前位置: 首页 > article >正文

DC00015基于java web校园网上购物系统

1、项目功能演示

DC00015【含配套文档】基于java web校园网上购物系统

2、项目功能描述

 基于java web校园网上购物系统分为用户和系统管理员两个角色。

2.1 用户功能

1、系统登录、用户注册、忘记密码
2、商品浏览、商品详情
3、购物车、付款
4、我的订单
5、修改密码、个人信息修改、退出系统

2.2 系统管理员功能

1、系统登录
2、商品管理:新增商品种类、商品种类列表、商品录入、商品列表
3、订单管理:订单列表、商品发货
4、用户管理:用户列表
5、系统管理:密码修改
6、退出系统

3、项目运行截图(部分) 

4、项目核心代码 

 4.1 beans.xml

<?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:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">


				<context:annotation-config/>
					<!-- 打开自动扫描 -->
			<context:component-scan base-package="com.cds" />
	<!-- 配置数据源和数据库连接池 -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
	<property name="driverClass" value="org.gjt.mm.mysql.Driver"/>
	<property name="jdbcUrl" value="jdbc:mysql://localhost:3305/webshopping?useUnicode=true&amp;characterEncoding=UTF8" />
	<property name="user" value="root"/>
	<property name="password" value="root"/>
	<!--初始化时获取的连接数,取值应在minPoolSize与maxPoolSize之间。Default: 3 -->
        <property name="initialPoolSize" value="1"/>
	<!--连接池中保留的最小连接数。-->
        <property name="minPoolSize" value="1"/>	
	<!--连接池中保留的最大连接数。Default: 15 -->
        <property name="maxPoolSize" value="100"/>
	<!--最大空闲时间,60秒内未使用则连接被丢弃。若为0则永不丢弃。Default: 0 -->
        <property name="maxIdleTime" value="60"/>	
	<!--当连接池中的连接耗尽的时候c3p0一次同时获取的连接数。Default: 3 -->
        <property name="acquireIncrement" value="5"/>	
	<!--每60秒检查所有连接池中的空闲连接。Default: 0 -->
        <property name="idleConnectionTestPeriod" value="60"/>
	
</bean>

	<!-- 将数据源注入到Spring的sessionFactory中 -->
<!--<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">-->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> 

		<property name="dataSource" ref="dataSource"/>
		<property name="packagesToScan">
    		<list>
    		 	<value>com.cds.po</value>
    		</list>
   		</property>
		<property name="hibernateProperties">
				<props>
					<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
					<prop key="hibernate.hbm2ddl.auto">update</prop>
					<prop key="hibernate.show_sql">true</prop>
					<prop key="format_sql">true</prop>
				</props>
		</property>

</bean>
	
	<!-- 配置spring的HibernateTemplate的事务模版 -->
	<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
		<property name="sessionFactory" ref="sessionFactory"></property>
	</bean>
	
</beans>	

 4.2 web.xml

<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
 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:beans.xml</param-value>
  </context-param>
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>classpath:log4j.properties</param-value>
  </context-param>
  <listener>
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  </listener>
  <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>encoding</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>utf-8</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>encoding</filter-name>
    <url-pattern>*.action</url-pattern>
  </filter-mapping>
  <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>webShopping</param-value>
  </context-param>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>

 4.3 struct.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
    "http://struts.apache.org/dtds/struts-2.1.dtd">

<struts>
<!-- 明确配置一下,会被第3方插件替换 -->
	<constant name="struts.objectFactory" value="spring" />
	<constant name="struts.devMode" value="true" />
	<constant name="struts.i18n.encoding" value="UTF-8" />
	<!-- 文件上传大小限制 为10M -->
	<constant name="struts.multipart.maxSize" value="10701096" />
	<constant name="struts.multipart.saveDir" value="/tmp"/>
	
     <package name="webShopping"  extends="struts-default">
         <!-- 用户 -->
        <action name="UserAction" class="userAction">
             <result name="login" >/login_error.jsp</result>
             <result name="index">/login_success.jsp</result>
             <result name="regsuccess">/register.jsp</result>
             <result name="regerror">/register.jsp</result>
             <result name="success">/reg_success.jsp</result>
             <result name="error">/reg_error.jsp</result>
             <result name="logout">/index.jsp</result>
             <result name="updateUser" >/userInfo.jsp</result>
             <result name="listUser" >/admin/include/user/userList.jsp</result>
             <result name="queryUser" >/admin/include/user/userQuery.jsp</result>
             <result name="findUsernull">/findPass.jsp</result>
             <result name="findUser" >/resetPass.jsp</result>
             <result name="updatePass">/resetPass.jsp</result>
             <result name="upPass">/updatePass.jsp</result>
             <result name="deleteUser">/admin/include/user/userList.jsp</result>
         </action>
         
         <!-- 管理员 -->
        <action name="AdminAction" class="adminAction">
             <result name="login" >/admin/login.jsp</result>
             <result name="index">/admin/index.jsp</result>
             <result name="logout">/admin/login.jsp</result>
             <result name="updateAdmin">/admin/include/admin/amend.jsp</result>
             
         </action>
         
          <!-- 商品种类 -->
        <action name="CommodityClassAction" class="commodityClassAction">
             <result name="addCommodityClass" >/admin/include/commodityClass/commodityClassAdd.jsp</result>
             <result name="listCommodityClass" >/admin/include/commodityClass/commodityClassList.jsp</result>
             <result name="deleteCommodityClass" type="redirect">CommodityClassAction!listCommodityClass.action</result>
         </action>
         <!-- 商品 -->
        <action name="CommodityAction" class="commodityAction">
        	<result name="addComm" >/admin/include/commodity/commodityAdd.jsp</result>
             <result name="addCommoditySuccess" >/admin/include/commodity/commodityAdd.jsp</result>
             <result name="addCommodityError" >/admin/include/commodity/commodityAdd.jsp</result>
             
             <result name="listCommodity" >/admin/include/commodity/commodityList.jsp</result>
             <result name="deleteCommodity" type="redirect">CommodityAction!listCommodity.action</result>
             <result name="findCommodityById" >/showdetails.jsp</result>
             <result name="findCommodityByName" >/showByName.jsp</result>
           <result name="findCommodityByClass" >/showByClass.jsp</result>
           
         </action>
         <!-- 购物车 -->
         <action name="AddToCarAction" class="addToCarAction">
         <result name="success" >/showCar.jsp</result>
         <result name="error" >/showCarnull.jsp</result>
         <result name="delete" >/showCar.jsp</result>
         </action>
          <!-- 订单 -->
         <action name="OrderFormAction" class="orderFormAction">
          <result name="listOrderForm" >/admin/include/order/orderList.jsp</result>
          <result name="conOrder" >/admin/include/order/orderList.jsp</result>
         
          <result name="queryOrder" >/admin/include/order/orderQuery.jsp</result>
          <result name="findOrderFormByUserName">/showOrderForm.jsp</result>
         <result name="payOrderForm">/payMent.jsp</result> 
          <result name="addOrderForm" >/payMent.jsp</result>
         <result name="payOrder">/showOrderForm.jsp</result> 
         </action>
         <!-- 留言 -->
         <action name="MessageAction" class="messageAction">
          <result name="listMessage" >/admin/include/message/messageList.jsp</result>
          <result name="queryMessage" >/admin/include/message/messageQuery.jsp</result>
          <result name="deleteMessage" type="redirect">MessageAction!listMessage.action</result>
         </action>
         <!-- 主页 -->
         <action name="GoIndexAction" class="goIndexAction">
			<result name="success">/index.jsp</result>
		</action>
     </package>
</struts>

5、项目内容包含

6、项目获取

6.1 方式一 

私信或者扫描下方名片获取完整项目。

6.2 方式二

点击此处直接获取万丈项目。 


http://www.kler.cn/a/320899.html

相关文章:

  • 透明部署、旁路逻辑串联的区别
  • 微信小程序实现长按录音,点击播放等功能,CSS实现语音录制动画效果
  • 腾讯云AI代码助手编程挑战赛——贪吃蛇小游戏
  • vue2日历组件
  • 内网基础-防火墙-隧道技术
  • 2025最新解决方案:新买的mac鼠标和这个触控板反向
  • Python图形用户界面设计的15个基础组件
  • SpringCloud Alibaba五大组件之——Sentinel
  • html实现黑白棋
  • 代码随想录算法训练营43期 | Day 21 —— 108.将有序数组转换为二叉搜索树、 538.把二叉搜索树转换为累加树
  • 【Linux】通过内核以太层可查看应用程序运行时访问外网情况
  • SQL - 进阶语法(一)
  • 数据结构——C语言单链表的实现
  • python实现石头,剪刀,布(turtle库简易版)
  • python接口自动化——unittest断言
  • leetcode 2024.9.26
  • 观《中国数据库前世今生》有感:从历史中汲取未来的力量
  • 常见排序(C语言版)
  • C# lambda表达式的几个案例
  • keepalived实战演练
  • Sealos 快速创建k8s 集群
  • 代码随想录算法训练营DAY09之动态规划(一)基础题目
  • 稀土功能化合物
  • HTML中的列表、表格、媒体元素和内联框架
  • 【C++习题】2.双指针_移动零
  • Rapid品牌SSL证书通配符单域名申请窍门