基于SSM框架的校园二手交易平台实战记录(一)

项目描述

这是大学期间实训时的小组项目,我主要负责框架搭建和后端实现,也涉及了部分前端页面设计。这篇文章主要是进行一个实战记录,方便自己以后回顾,也顺便分享我自己的项目开发历程,也希望能帮到像我一样的小白,文章中如有错误,希望大佬能够指出,感谢。

  • JDK版本:1.7
  • 数据库:MySQL
  • 框架:Spring + SpringMVC + MyBatis
  • 服务器:Tomcat
  • 开发工具:MyEclipse 10

二手商品交易平台是一个针对校园范围内使用的二手商品交易平台,是提供个人与个人之间的电子商务通道,用户即是买家又是卖家。平台中,用户可以发布自己的闲置二手物品,浏览校园内闲置商品信息,可以搜索自己想要购买的商品,来购买其他卖家的闲置商品,在确认购买商品后,会在订单中获得卖家的联系信息,与卖家私下交流完成交易。
该项目是针对校园中的学生,方便学生去获得周围闲置物品信息的平台,交易全是学生自主交易,本产品不承担相应的法律责任。

项目预览

用户页面

登录页面
这是用户登录界面,管理员登录页面从登录按钮的左下链接进入。
在这里插入图片描述
注册页面
在这里插入图片描述
网站主页
在这里插入图片描述
商品页面
在这里插入图片描述
商品详情页
购买后,按订单中的联系方式,自行联系卖家,双方私下交易,平台不进行资金流转,这样就能有效避免商品与实物不符的问题。
在这里插入图片描述
商品发布页面
在这里插入图片描述
我的发布页面
在这里插入图片描述
商品信息修改页面
在这里插入图片描述
我的订单页面
在这里插入图片描述
修改密码页面
在这里插入图片描述
修改个人信息页面
在这里插入图片描述

管理员页面

管理员主页
在这里插入图片描述
商品管理页面
在这里插入图片描述
商品详情页面
管理员的商品详情页面没有购买按钮。
在这里插入图片描述
用户管理页面
在这里插入图片描述

项目开发

maven依赖

<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
 </dependency>
 <dependency>
          <groupId>jstl</groupId>
          <artifactId>jstl</artifactId>
          <version>1.2</version>
 </dependency>
  <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
<dependency>
    <groupId>commons-fileupload</groupId>
    <artifactId>commons-fileupload</artifactId>
    <version>1.4</version>
</dependency>
  <!-- Mysql的驱动包 -->
        <dependency>
   <groupId>mysql</groupId>
   <artifactId>mysql-connector-java</artifactId>
   <version>5.1.21</version>
  </dependency>
  <!-- dbcp坐标 -->
  <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.2.2</version>
        </dependency>
        <!-- aspectj坐标 -->
        <dependency>
   <groupId>org.aspectj</groupId>
   <artifactId>aspectjweaver</artifactId>
   <version>1.7.1</version>
  </dependency>
        <!--  SpringMVC坐标 -->
        <dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-webmvc</artifactId>
   <version>3.2.0.RELEASE</version>
  </dependency>
  <!-- Spring坐标 -->
  <dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-core</artifactId>
   <version>3.2.0.RELEASE</version>
  </dependency>
  
  <dependency>
           <groupId>org.springframework</groupId>
           <artifactId>spring-beans</artifactId>
           <version>3.2.0.RELEASE</version>
       </dependency>
       
       <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-context</artifactId>
          <version>3.2.0.RELEASE</version>
      </dependency>
       
  <!-- mybatis坐标 -->
  <dependency>
   <groupId>org.mybatis</groupId>
   <artifactId>mybatis</artifactId>
   <version>3.1.1</version>
  </dependency>
  <!-- Spring整合mybatis坐标 -->
  <dependency>
   <groupId>org.mybatis</groupId>
   <artifactId>mybatis-spring</artifactId>
   <version>1.1.1</version>
  </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.annotation</artifactId>
      <version>3.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.ejb</artifactId>
      <version>3.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.weld</groupId>
      <artifactId>weld-osgi-bundle</artifactId>
      <version>1.0.1-SP3</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.servlet</artifactId>
      <version>3.0.1</version>
    </dependency>
    <!-- whl -->
    <dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.4</version>
</dependency>
<dependency>
    <groupId>commons-beanutils</groupId>
    <artifactId>commons-beanutils</artifactId>
    <version>1.7.0</version>
</dependency>
<dependency>
    <groupId>net.sf.ezmorph</groupId>
    <artifactId>ezmorph</artifactId>
    <version>1.0.6</version>
</dependency>
<dependency>
    <groupId>org.json</groupId>
    <artifactId>json</artifactId>
    <version>20160810</version>
</dependency>
<dependency>
    <groupId>commons-lang</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.5</version>
</dependency>
<dependency>
    <groupId>commons-collections</groupId>
    <artifactId>commons-collections</artifactId>
    <version>3.1</version>
</dependency>
<dependency>  
    <groupId>com.alibaba</groupId>  
    <artifactId>fastjson</artifactId>  
    <version>1.2.41</version>  
</dependency>

框架搭建

我们用的是SSM框架,具体的搭建方法,当时我也是在CSDN学习了一会,这里附上一个学习的链接:SSM框架搭建学习

JSP

页面展示上面就有,也没用到什么高级的前端开发技巧,基本上会一些HTML、CSS、JS这些就能照猫画虎的写出来。如果HTML这些没怎么学过的话,在CSDN搜一些相关教学学一下就行了,这里我就不多做赘述,也可以不写CSS这些样式文件,写写JSP测试页面就行,能进行测试运行就行。

猜你喜欢

转载自blog.csdn.net/qq_45050480/article/details/106834125