- 浏览: 194813 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (101)
- 职业 (4)
- 生活 (3)
- 场景应用 (6)
- flex (14)
- java (31)
- php (2)
- python (2)
- hadoop (6)
- 项目管理 (1)
- 工作流 (4)
- 手机web应用 (3)
- 算法 (4)
- 小技巧 (1)
- 数据库 (2)
- sphinx (1)
- web综合 (15)
- spring (5)
- 设计 (9)
- javascript (3)
- linux (2)
- 报表 (2)
- delphi (1)
- ejb (1)
- 架构 (3)
- uml (3)
- lucene (2)
- BI (1)
- 多线程 (1)
- 地图 (1)
- gis (1)
- 网络基础 (1)
- spark (2)
- 分布式 (3)
- ext (1)
- android (3)
- arduino (1)
- 协同办公 (2)
- OA流程 (2)
- 畅想 (1)
- ios (3)
- swift (1)
- webkit (1)
- c (1)
- 浏览器 (1)
- html5 (2)
- rtmp (1)
- soket (1)
- AI (2)
- tensorflow (1)
- ignite (1)
- react (4)
- 新空间 (2)
- 闲话 (3)
- docker (1)
- kubernetes (1)
最新评论
-
wenzhiyinghen:
...
spark 学习 -
zlbdexiaohao:
flex 写的时钟 -
minn84:
luoguohong88 写道你上传的那个openi.zip ...
openi1.3 eclipse 整合调试 -
luoguohong88:
你上传的那个openi.zip (5.5 MB)有问题 能再上 ...
openi1.3 eclipse 整合调试 -
minn84:
demo的思路很简单,主要是两点:1.hadoop负责处理数据 ...
hadoop+lucene+web 综合小demo
闲时无事,搞了个struts2+spring+ibatis+jquery+json的小例子
spring配置文件:
<?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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>domain/SqlMapConfig.xml</value>
</property>
</bean>
<!-- 配置事务管理器 -->
<!-- 配置DAO类-->
<bean id="accountDao"
class="domain.AccountDao">
<property name="sqlMapClient">
<ref bean="sqlMapClient"/>
</property>
</bean>
<bean id="accountService" class="domain.AccountService">
<property name="accountDao" ref="accountDao"></property>
</bean>
<!-- struts2 -->
<bean id="accountAction" scope="prototype" class="domain.AccountAction">
<property name="accountService" ref="accountService"/>
</bean>
</beans>
ibatis配置文件:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<transactionManager type="JDBC" commitRequired="false">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
<property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost:3306/ibatis?characterEncoding=utf-8"/>
<property name="JDBC.Username" value="root"/>
<property name="JDBC.Password" value="5813391"/>
</dataSource>
</transactionManager>
<sqlMap resource="domain/Account.xml"/>
</sqlMapConfig>
struts2配置文件:
<?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.objectFactory" value="spring" />
<constant name="struts.devMode" value="true" />
<package name="ibatis" namespace="/" extends="struts-default">
<action name="addAccount" class="accountAction" method="addAccount">
<result>/index.jsp</result>
</action>
</package>
</struts>
spring配置文件:
<?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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>domain/SqlMapConfig.xml</value>
</property>
</bean>
<!-- 配置事务管理器 -->
<!-- 配置DAO类-->
<bean id="accountDao"
class="domain.AccountDao">
<property name="sqlMapClient">
<ref bean="sqlMapClient"/>
</property>
</bean>
<bean id="accountService" class="domain.AccountService">
<property name="accountDao" ref="accountDao"></property>
</bean>
<!-- struts2 -->
<bean id="accountAction" scope="prototype" class="domain.AccountAction">
<property name="accountService" ref="accountService"/>
</bean>
</beans>
ibatis配置文件:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<transactionManager type="JDBC" commitRequired="false">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
<property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost:3306/ibatis?characterEncoding=utf-8"/>
<property name="JDBC.Username" value="root"/>
<property name="JDBC.Password" value="5813391"/>
</dataSource>
</transactionManager>
<sqlMap resource="domain/Account.xml"/>
</sqlMapConfig>
struts2配置文件:
<?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.objectFactory" value="spring" />
<constant name="struts.devMode" value="true" />
<package name="ibatis" namespace="/" extends="struts-default">
<action name="addAccount" class="accountAction" method="addAccount">
<result>/index.jsp</result>
</action>
</package>
</struts>
- ibatis2.rar (16.4 KB)
- 下载次数: 360
发表评论
-
多语言版基础管理系统展示[es6版]-入门配置篇
2018-10-26 07:17 516新增一篇入门配置文档 原文地址: http://www.i8 ... -
多语言版基础管理系统展示[es6版] -流程配置效果
2017-12-17 19:42 704终于找到一个可以较好展示工作流程配置的 ... -
多语言版基础管理系统展示[es6版]-简单整合spring+tensorflow+ignite+hadoop
2017-08-05 18:14 8121.整合基于[多语言版基础管理系统展示[es6版] ] ... -
多语言版基础管理系统展示[es6版]-简单整合tensorflow
2017-05-03 19:48 1002在大数据和AI渐渐兴起的时候,这是一个关于大 ... -
基于html5的websocket和rtmp协议的java socket服务器
2016-12-07 07:20 1055现代企事业单位中,会涉及到数据推送和获取服 ... -
多语言版基础管理系统展示[flash版]-hadoop+spark+spring简单整合
2016-06-18 21:36 4280本demo基于多语言版基础管理系统展示[fl ... -
ios简单的增删查例子
2015-02-23 16:08 834本例子分为两 ... -
spark 学习
2013-05-18 00:13 19168spark,又一个传说中的分布式实现,详情:ht ... -
基于rtmp协议的java多线程服务器
2013-03-31 21:34 3835打算设计这个半开源服务的计划已经有很长时间了,大 ... -
矩阵算法实现修改
2013-03-23 00:10 1000前段时间因为项目需要,需要实现一个据说是某高 ... -
hadoop+lucene+web 综合小demo
2013-03-02 01:28 13707很长一段时间没有关注hadoop,突然间有兴致,于是动手又 ... -
ejb3.x 简单小 demo
2012-02-21 21:07 1160本demo适合有一定编程经验的自学者 ,简单易懂,涉及数据 ... -
java综合
2012-02-11 22:00 1426以下自定义的简单类中,分析涉及的基础知识 / ... -
java nio应用 aes字符串加密与解密
2010-08-18 22:36 1958import java.io.IOException; imp ... -
java excel内容转换为键/值对基本通用方法与数据库导入
2010-06-01 23:28 1680有时候我们需要从execel中导入大量的数据,编程过程中就遇到 ... -
简单servlet socket 整合
2010-05-05 21:52 4337package filter; import java.io ... -
java写的简单生成sql语句的工具方法
2010-04-20 23:02 3427jdbc编程中,最麻烦的是拼sql语句,尤其是字段太多的时候, ... -
基于rtmp协议用java nio写小型游戏服务器的总结3
2010-03-05 20:59 2152在flex使用rtmp协议进行连接的时候,有个握手的过程,详情 ... -
基于rtmp协议用java nio写小型游戏服务器的总结2
2010-03-04 21:41 2271今天介绍一下学习rtmp的过程,首先当然是baidu和goog ... -
基于rtmp协议用java nio写小型游戏服务器的总结1
2010-03-03 22:55 2483前一阵子,进了一家公司,工作的内容是写基于rtmp协议的jav ...
相关推荐
用Struts2,Spring,Ibatis整合的框架,前端数据显示用jquery 中的ajax请求,返回json格式的数据
struts2 spring2 ibatis2 jquery json 页面无刷新分页.有问题联系QQ:765374922
Struts spring ibatis json整合实例(附完整jar包,无数据库文件),前台使用jquery。附带用jquery.ajax请求后台返回json格式数据!
yoyo进销存,jsp+java+struts+spring+ibatis+jquery+json+mysql。 中小微企业个体户的进销存。 这里是安装操作手册及下载地址说明。
此案例是学习struts2 spring3 ibatis整合的极品案例,里面涉及到了增删改查,数据库使用oracle数据库。页面请求全部使用ajax请求,数据传输以JSON格式传输,并且使用的是struts2 的JSON技术。页面js使用Jquery1.6 ,...
API.chm、JavaScript.chm、JavaScript源码特效.chm、javascript中文版.chm、jdk142.chm、jdk150.chm、jQuery1.2API.chm、jQueryAPI_CHM.CHM、jsp.chm、Junit4.8.2.chm、rails-documentation-1-2-1.chm、spring2.5.6....
java最新技术点,jquery json ibatis spring struts
第 1章 STRUTS2入门................................................................................................................................................3 第 2章STRUTS2晋级.....................
掌握主流的Java开源框架Struts2、Spring、SpringMVC、Hibernate/Mybatis、iBatis等,最好熟悉Freemaker或volecity。 2. 熟悉中间件Tomcat、jboss、Apache、Weblogic、WAS; 3. 熟悉各种Web前端技术,包括JavaScript...