项目说明

1、项目文件结构

2、项目主要接口及其实现

(1)Index:

首页页面:展示商品功能,可登录或查看商品详细信息

(2)登录:/ApiLogin

3、dao层

数据持久化层,把商品和用户信息寸进mysql数据库

(1)ContentDao

(2)PersonDao

(3)ProductDao

(4)TransactionDao

4、spring配置文件和mybatis配置文件

spring-mvc.xml

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <beans xmlns="http://www.springframework.org/schema/beans"
 3        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4        xmlns:context="http://www.springframework.org/schema/context"
 5        xmlns:mvc="http://www.springframework.org/schema/mvc"
 6        xsi:schemaLocation="http://www.springframework.org/schema/beans
 7                         http://www.springframework.org/schema/beans/spring-beans.xsd
 8                         http://www.springframework.org/schema/context
 9                         http://www.springframework.org/schema/context/spring-context.xsd
10                         http://www.springframework.org/schema/mvc
11                         http://www.springframework.org/schema/mvc/spring-mvc.xsd">
12
13     <!-- 自动扫描该包,使SpringMVC认为包下用了@controller注解的类是控制器 -->
14     <context:component-scan base-package="com.web.controller"></context:component-scan>
15     <!-- 扩充了注解驱动,可以将请求参数绑定到控制器参数 -->
16     <mvc:annotation-driven/>
17     <mvc:default-servlet-handler/>
18
19     <!-- 配置事务管理器
20     <bean id="transactionManager"
21           class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
22         <!- 注入数据库连接池 ->
23         <property name="dataSource" ref="dataSource"/>
24     </bean>
25     -->
26     <!-- freemarker配置 -->
27     <bean id="freemarkerConfig"
28           class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
29         <property name="templateLoaderPath" value="/WEB-INF/freemarker" />
30         <property name="templateLoaderPaths" value="/template"/>
31         <property name="freemarkerSettings">
32             <props>
33                 <prop key="template_update_delay">0</prop><!--刷新模板的周期,单位为秒-->
34                 <prop key="defaultEncoding">UTF-8</prop><!--模板的编码格式 -->
35             </props>
36         </property>
37     </bean>
38     <!-- freemarker视图解析器 -->
39     <bean
40             class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
41         <property name="viewResolvers">
42             <list>
43                 <bean id="viewResolver"
44                       class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
45                     <property name="cache" value="true" />
46                     <property name="prefix" value="" />
47                     <property name="suffix" value=".ftl" />
48                     <property name="contentType" value="text/html; charset=UTF-8" />
49                 </bean>
50             </list>
51         </property>
52         <property name="defaultViews">
53             <list>
54                 <bean
55                         class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
56             </list>
57         </property>
58     </bean>
59     <!-- SpringMVC上传文件时,需要配置MultipartResolver处理器 -->
60     <bean id="multipartResolver"
61           class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
62         <property name="defaultEncoding" value="UTF-8" />
63         <!-- 指定所上传文件的总大小,单位字节。注意maxUploadSize属性的限制不是针对单个文件,而是所有文件的容量之和 -->
64         <property name="maxUploadSize" value="10240000" />
65     </bean>
66
67     <!--注册拦截器-->
68
69 </beans>

spring-mybatis.xml

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <!-- 配置文件需要引入的类 -->
 3 <beans xmlns="http://www.springframework.org/schema/beans"
 4        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 5        xmlns:context="http://www.springframework.org/schema/context"
 6        xmlns:mybatis="http://mybatis.org/schema/mybatis-spring"
 7        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
 8
 9         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
10
11
12
13
14         http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring.xsd">
15     <!-- scanner -->
16     <context:component-scan base-package="com.web.service"></context:component-scan>
17     <context:component-scan base-package="com.web.service.impl"></context:component-scan>
18
19
20     <!-- Spring and mybatis-->
21     <mybatis:scan base-package="com.web.dao"/>
22
23
24     <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
25         <property name="dataSource" ref="dataSource"/>
26     </bean>
27
28     <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
29           destroy-method="close">
30         <property name="driverClassName" value="${jdbc.driverClassName}"></property>
31         <property name="url" value="${jdbc.url}"></property>
32         <property name="username" value="${jdbc.username}"></property>
33         <property name="password" value="${jdbc.password}"></property>
34         <!-- 初始化连接大小 -->
35         <property name="initialSize" value="${initialSize}"></property>
36         <!-- 连接池最大数量 -->
37         <property name="maxActive" value="${maxActive}"></property>
38         <!-- 连接池最大空闲 -->
39         <property name="maxIdle" value="${maxIdle}"></property>
40         <!-- 连接池最小空闲 -->
41         <property name="minIdle" value="${minIdle}"></property>
42         <!-- 获取连接最大等待时间 -->
43         <property name="maxWait" value="${maxWait}"></property>
44     </bean>
45
46     <context:property-placeholder location="classpath:db.properties"/>
47
48     <!-- 配置基于注解的声明式事务
49     <bean id="transactionManager"
50                 class="org.springframework.orm.jpa.JpaTransactionManager">
51         <property name="dataSource" ref="dataSource" />
52     </bean>
53
54     <tx:annotation-driven transaction-manager="transactionManager"/>
55     -->
56 </beans>

db.properties

 1 jdbc.driverClassName= com.mysql.jdbc.Driver
 2 jdbc.url= jdbc:mysql://localhost:3306/shen_db?characterEncoding=utf8&useSSL=true
 3 jdbc.username=root
 4 jdbc.password=123456
 5 initialSize=0
 6 #定义最大连接数
 7 maxActive=20
 8 #定义最大空闲
 9 maxIdle=20
10 #定义最小空闲
11 minIdle=1
12 #定义最长等待时间
13 maxWait=60000

5、运行截图

首页

买家购物车

买家账单

卖家发布商品界面

转载于:https://www.cnblogs.com/shenzhi/p/7590973.html

基于ssm框架和freemarker的商品销售系统相关推荐

  1. 计算机毕业设计ssm基于SSM框架的宿舍管控平台6z76b系统+程序+源码+lw+远程部署

    计算机毕业设计ssm基于SSM框架的宿舍管控平台6z76b系统+程序+源码+lw+远程部署 计算机毕业设计ssm基于SSM框架的宿舍管控平台6z76b系统+程序+源码+lw+远程部署 本源码技术栈: ...

  2. 基于SSM框架开发的网上图书商城系统 附带详细运行指导视频

    项目描述:这是一个基于SSM框架开发的网上图书商城系统.首先,这个项目页面简洁清爽,代码注释详尽,易于理解和学习.其次,这个项目涉及到Shiro整合JWT.秒杀功能所具备的基本要求(限流.乐观锁.接口 ...

  3. 基于SSM框架的体育用品商城购物系统

    基于SSM框架的体育用品商城购物系统 本系统是基于SSM框架的体育用品商城购物系统,本系统后端使用ssm框架,数据库使用mysql,前端使用bootstrap,JQuery框架,页面使用JSP 用户可 ...

  4. 基于SSM框架的杰森摄影工作室选片系统的设计和开发论文

    基于SSM框架的杰森摄影工作室选片系统的设计和开发 摘 要 面对巨大的市场和激烈的竞争,摄影/照相馆行业商家必须紧跟行业发展的步伐,导入新的经营理念和推广方式,才不至于在激烈的市场竞争中被淘汰出局.信 ...

  5. 毕业设计:基于SSM框架的新生报到数据可视化系统

    前言:本文介绍的是一个基于SSM框架的新生报到数据可视化系统,是一个毕业设计成品,该系统主要采用JAVA语言编写,主要应用到了SpringBoot框架,Mybatis框架.mysql数据库以及redi ...

  6. 基于SSM框架+thymeleaf+layui的蛋糕商城系统(小组作业|期末大作业)

    期末大作业(小组作业) 基于SSM框架+thymeleaf+layui的蛋糕商城系统 项目技术点及开发工具 后端:SSM框架 前端:layui 前后端连接:thymeleaf(视图模板渲染技术) 数据 ...

  7. mysql -ss -e_课内资源 - 基于ssm框架和mysql的网上选课系统

    一.需求分析 1.1 业务需求 随着社会的发展,学生的人数和课程种类急速增加,传统的选课管理模式已经无法满足当前的实际需求,为此我们开发了学生选课管理系统.本人结合学生选课管理的实际需要,完成了对学生 ...

  8. 基于ssm框架的同城物流配送网站系统

    本文介绍了同城物流配送管理设计方案,该网站采用目前JSP中最流行的SSM框架和Eclipse编辑器.MySQL数据库设计并实现的.网站功能包含系统用户管理.新闻数据管理.商品管理.下单管理.物流订单管 ...

  9. 基于SSM框架的校园快递代领系统

    校园快递代领系统的基本功能:系统用户管理.新闻数据管理.系统简介设置.用户注册管理.留言管理.友情连接管理.变幻图管理.代领员管理.代领订单管理.取单管理.主要有Java编程语言,ssm框架,Mysq ...

最新文章

  1. 数据结构|-常见数据结构整理
  2. Only POT texture can be compressed to PVRTC format
  3. JAVA实现中点画线_实验1-中点画线和Bresenham画线算法的实现
  4. Google 多任务学习框架 MMoE
  5. 【Linux】34. shell脚本判断当前年份是否正确
  6. C++STL理论基础
  7. vue js前端根据所需参数生成二维码并下载
  8. 【英语学习】【WOTD】hoopla 释义/词源/示例
  9. vc实现文件的打印--BOOL Print_html(const char *sURL)
  10. 《跨界杂谈》商业模式(三):黑帮
  11. 创建Oracle本地数据库详细步骤,Oracle-创建本地数据库
  12. 【BZOJ 3308】 3308: 九月的咖啡店 (费用流|二分图最大权匹配)
  13. [裴礼文数学分析中的典型问题与方法习题参考解答]5.1.26
  14. 百度翻译API教程(完整Android代码)
  15. lol手游之任务进度条精准计算
  16. vue中的class和style在行内中用发有几种
  17. sgu290:Defend the Milky Way(三维凸包)
  18. sql2000安装程序配置服务器失败
  19. 销售订单行项的成本估算及其发布
  20. nacos 怎么配置 里的配置ip_2.nacos服务配置中心

热门文章

  1. vue watch 第一次不执行_Vue 实现前进刷新,后退不刷新的效果
  2. 信号与系统 徐亚宁 matlab程序,信号与系统(第4版)
  3. 芝枝.计算机与人文科学,计算机与人文科学
  4. yum mysql5.7位置_CentOS yum 安装 Mysql5.7
  5. 计算机里有个不能进入的磁盘分区,新电脑只有一个分区怎么办? 教你们如何不进pe给硬盘创建新分区!...
  6. 【C++ grammar】常量、指针、Usage of using, typedef, and #define
  7. 【数据结构基础笔记】【树】
  8. 【电设控制与图像训练题】【激光打靶】【opencv测试代码以及效果】
  9. kotlin 第一个程序_Kotlin程序添加两个矩阵
  10. java中访问修饰符_Java中的非访问修饰符是什么?