SSH_ProductCRUD的项目结构与配置文件
项目结构

各类配置文件
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="pojo">
<class name="Product" table="product_">
<id name="id" column="id">
<generator class="native">
</generator>
</id>
<property name="name" />
<property name="price" />
</class> </hibernate-mapping>
Product.hbm.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd"> <struts>
<constant name="struts.i18n.encoding" value="UTF-8"></constant> <constant name="struts.objectFactory" value="spring"/> <package name="basicstruts" extends="struts-default"> <action name="listProduct" class="productActionBean" method="list">
<result name="listJsp">list.jsp</result>
</action> </package>
</struts>
struts.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:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <bean name="productActionBean" class="action.ProductAction">
<property name="productService" ref="productServiceImpl" />
</bean> <bean name="productServiceImpl"
class="service.impl.ProductServiceImpl">
<property name="productDAO" ref="productDAOImpl" />
</bean>
<bean name="productDAOImpl" class="dao.impl.ProductDAOImpl">
<property name="sessionFactory" ref="sf" />
</bean> <bean name="sf"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="ds" />
<property name="mappingResources">
<list>
<value>pojo/Product.hbm.xml</value>
</list>
</property> <property name="schemaUpdate">
<value>true</value>
</property> <property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
hbm2ddl.auto=update
</value>
</property>
</bean> <bean name="ds"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/test?characterEncoding=UTF-8" />
<property name="username" value="root" />
<property name="password" value="admin" />
</bean>
</beans>
applicationContext.xml
<web-app>
<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>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<url-pattern>/*</url-pattern>
</filter-mapping> <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> </web-app>
web.xml
SSH_ProductCRUD的项目结构与配置文件的更多相关文章
- XXX_ProductCRUD的项目结构与配置文件
MVC_ProductCRUD Hibernate_ProductCRUD 项目结构 ...
- net core体系-web应用程序-3项目结构、配置文件详解
一.应用程序文件结构 如下图所示,相比于Asp.Net项目,在新建的Asp.Net Core项目中,没有了Global.asax以及Web.config这样的文件,但多了几个其他主要的文件,它们分别为 ...
- 认识ASP.NET 5项目结构和项目文件xproj
ASP.NET 5 在项目结构上做了很大的改变,我们以前熟悉的目录结构与项目文件内容都不太一样了,本篇文章带大家了解 ASP.NET 5 到底跟以前有哪些不一样的地方. 我们先用 Visual Stu ...
- Mybatis 复习 Mybatis 配置 Mybatis项目结构
pom.xml文件已经贴在了文末.该项目不使用mybatis的mybatis-generator-core,而是手写Entities类,DaoImpl类,CoreMapper类 其中,Entities ...
- django开发个人简易Blog——构建项目结构
开发之前第一步,就是构造整个的项目结构.这就好比作一幅画,第一步就是描绘轮廓,有了轮廓,剩下的就是慢慢的填充细节.项目结构规划如下图: 项目结构描述: 本项目以fengzhengBlog为根目录. a ...
- Android项目结构 以及体系结构
学习Android平台的人一般对Android的平台的应该有点认识 其它的就不多讲了 Android项目一般由以下几个部分构成 以上是一个简单的Android项目结构目录图 1. src 主要是 源 ...
- MVC项目创建与项目结构介绍
一.创建MVC项目 打开VS202,点击:文件—>新建—>项目—>Web—>Asp.Net MVC 4 Web应用程序 填好项目名称.解决方案名称和文件存放位置,然后点击确定, ...
- 二十四、【开源】EFW框架Winform前端开发之项目结构说明和调试方法
回<[开源]EFW框架系列文章索引> EFW框架源代码下载V1.2:http://pan.baidu.com/s/1hcnuA EFW框架实例源代码下载:http://pan ...
- maven(一)初步搭建,项目结构
一.环境准备 java环境, jdk 1.5 以上 MyEclipse集成工具,我装的是8.5 版本 二.快速安装及配置 1.下载maven: http://maven.apache.org/docs ...
随机推荐
- 数据挖掘入门系列教程(十二)之使用keras构建CNN网络识别CIFAR10
简介 在上一篇博客:数据挖掘入门系列教程(十一点五)之CNN网络介绍中,介绍了CNN的工作原理和工作流程,在这一篇博客,将具体的使用代码来说明如何使用keras构建一个CNN网络来对CIFAR-10数 ...
- mysql 5.7 MGR
最近看了一下mysql5.7的MGR集群挺不错的,有单主和多主模式,于是乎搭建测试了一下效果还不错,我指的不错是搭建和维护方面都比较简单.网上绝大多数都是单主模式,当然我这里也是,为了加深印象,特意记 ...
- 学习笔记之pip的基本使用
粗略学习了pip的基础知识,便将此作为学习笔记记录下来同样希望分享的能帮到大家! 如果自己电脑没有pip,小澈在此分享如何安装,解决办法很多呢 1.使用easy_install安装: 各种进入到eas ...
- C# 基础知识系列- 16 开发工具篇
0. 前言 这是C# 基础知识系列的最后一个内容讲解篇,下一篇是基础知识-实战篇.这一篇主要讲解一下C#程序的结构和主要编程工具. 1. 工具 工欲善其事必先利其器,在实际动手之前我们先来看看想要编写 ...
- D. Almost All Divisors(数学分解因子)
其实这题并不难啊,但是分解因子的细节一定要小心. \(比如样例48,2是因子说明24也是因子,也就是说假如x存在\) \(那么x一定是因子中的最小数乘上最大数\) \(那我们现在去验证x是否存在,先拿 ...
- C - 小明系列故事――捉迷藏 HDU - 4528 bfs +状压 旅游-- 最短路+状压
C - 小明系列故事――捉迷藏 HDU - 4528 这个题目看了一下题解,感觉没有很难,应该是可以自己敲出来的,感觉自己好蠢... 这个是一个bfs 用bfs就很好写了,首先可以预处理出大明和二明能 ...
- C. Barcode dp
https://codeforces.com/problemset/problem/225/C 这个题目和之前一个题目很像 https://www.cnblogs.com/EchoZQN/p/1090 ...
- 【FPGA篇章四】FPGA状态机:三段式以及书写方法
欢迎大家关注我的微信公众账号,支持程序媛写出更多优秀的文章 状态机是fpga设计中极其重要的一种技巧,状态机通过不同的状态迁移来完成特定的逻辑操作,掌握状态机的写法可以使fpga的开发事半功倍. 状态 ...
- Linux dts 设备树详解(一) 基础知识
Linux dts 设备树详解(一) 基础知识 Linux dts 设备树详解(二) 动手编写设备树dts 文章目录 1 前言 2 概念 2.1 什么是设备树 dts(device tree)? 2. ...
- FPGA的“可编程”使你迷惑吗?
http://www.alteraforum.com.cn/showtopic-7791.aspx FPGA的“可编程”使你迷惑吗? 任何一个硬件工程师对FPGA都不会陌生,就好比C语言对于软件工 ...