- 浏览: 428632 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (211)
- 思考》感想 (11)
- 数据库操作 譬如Oracle大叔 (7)
- java,咱们有缘吗 (16)
- delphi,你还好吗 (2)
- SSH,哥三儿好 (31)
- 问题!问题?问题!? (9)
- WITH WORK (1)
- 算法与模式 莫事^_^ (10)
- JSP,可以叫你P兄么 (2)
- 啊,咋科斯╮(╯▽╰)╭ (6)
- 巨人肩上的小石子 (2)
- flash她妹flex (38)
- 项目管理 (10)
- 奥特曼,你弟Android来了 (4)
- 麻辣儿gis (0)
- maven 嘛味儿 (3)
- ws 哇塞 webservice (5)
- Oh,no!!!,NoSql (1)
- QQ他哥也是个企鹅,Linux (6)
- 姓i还是姓my 你都叫batis ibatis (3)
- 我喜欢夏天(春天旁边的那个季节)Springside (1)
- 测试! 测就测吧,没有喝(⊙o⊙) (3)
- 是晕+_+ 是浮云 还是云计算 (4)
- ExtJS 你是flex他哥还是他妹 (10)
- svg 你丫的资料真少 (3)
- 叫屁屁还是叫加加 ⊙﹏⊙ c++ (5)
- 鸟,还是只百灵鸟 BIRT (1)
- 权限管理 有权真好 是吧-_-! (1)
- SSH (2)
- 哥三儿好 (2)
- nginx (1)
- Oh (1)
- no!!! (1)
- NoSql (1)
最新评论
-
mong619226543:
谢谢
No identifier specified for entity -
akka_li:
没看懂啥意思!什么原因导致java.net.SocketExc ...
java.net.SocketException: Connection reset 问题解决方法 -
west_jing:
1L正解,<mvc:annotation-driven/ ...
<mvc:default-servlet-handler/> 导致 Controller失效 -
u010954806:
tgfhfdhdf
Spring Security 国际化文件 messages_zh_CN.properties 中文解释 -
yenshen:
我也碰到这个问题了,找了一大圈,最终问题解决了:<con ...
<mvc:default-servlet-handler/> 导致 Controller失效
web.xml------>
struts配置------>
spring集成Hibernate配置------>
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <!-- web容器实例化spring实例 --> <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> <!-- 整合struts --> <servlet> <servlet-name>struts</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>struts</servlet-name> <url-pattern>*.do</url-pattern> </servlet-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>/*</url-pattern> </filter-mapping> <!-- 使用spring解决hibernate因session关闭导致的延迟加载例外问题,即OpenSessionInView --> <filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
struts配置------>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://struts.apache.org/dtds/struts-config_1_3.dtd"> <struts-config> <form-beans> <form-bean name="loginForm" type="com.xx.web.form.LoginForm"></form-bean> </form-beans> <action-mappings> <action path="/list" type="com.xx.web.action.PersonAction" scope="request" validate="false"> <forward name="list" path="/WEB-INF/page/list.jsp"/> </action> <action path="/xx/login" type="com.xx.web.action.LoginAction" name="loginForm" scope="request" validate="false"> <forward name="message" path="/WEB-INF/page/message.jsp"/> </action> </action-mappings> <!-- 目的是让spring管理action bean--> <controller> <set-property property="processorClass" value="org.springframework.web.struts.DelegatingRequestProcessor"/> </controller> </struts-config>
spring集成Hibernate配置------>
<?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:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation=" http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd 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/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> <!-- 数据源配置 --> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql:///test"/> <property name="username" value="root"/> <property name="password" value="root"/> <!-- 连接池启动时的初始值 --> <property name="initialSize" value="1"/> <property name="maxActive" value="200"/> <property name="maxIdle" value="5"/> <property name="minIdle" value="2"/> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <!-- hbm.xml文件 --> <property name="mappingResources"> <list> <value>com/xx/dao/Person.hbm.xml</value> </list> </property> <!-- Hibernate配置信息 --> <property name="hibernateProperties"> <value> hibernate.dialect=org.hibernate.dialect.MySQL5Dialect hibernate.hbm2ddl.auto=update hibernate.show_sql=true hibernate.format_sql=false </value> </property> </bean> <!-- 配置事务信息 --> <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <!-- 采用注解方式进行事务配置 --> <tx:annotation-driven transaction-manager="txManager"/> <!-- 采用注解注入对象 --> <context:annotation-config/> <bean id="personService" class="com.xx.service.impl.PersonServiceBean"></bean> <bean name="/list" class="com.xx.web.action.PersonAction"></bean> </beans>
发表评论
-
Spring Security 国际化文件 messages_zh_CN.properties 中文解释
2011-05-04 17:08 7033Spring Security 国际化文件 messages_ ... -
两个Spring Security问题
2011-05-04 17:06 2059两个Spring Security问题 ---------》 ... -
一个spring security 配置列子
2011-05-03 16:48 1220<?xml version="1.0" ... -
spring security与数据库交互实现简单例子
2011-04-19 16:34 1633spring security与数据库交互实现简单例子 最近 ... -
用struts2 验证用户登录demo
2011-01-28 15:38 2154用struts2 验证用户登录de ... -
Struts2.1.8 执行顺序
2011-01-28 15:18 865public class LoginAction extend ... -
Struts2令人纠结的一个问题
2011-01-27 09:47 970我用Struts2加入自定义的library如下图,就报错, ... -
一份spring配置文件
2011-01-13 14:05 940<?xml version="1.0" ... -
Hibernate关系映射总结
2010-10-18 10:35 1243其实这些东东完全可以参考帮助文档;这里只是总结下。 》》》一对 ... -
No identifier specified for entity:XX.xx
2010-10-12 17:25 1646No identifier specified for ent ... -
Annotation对Hibernate中联合主键定义
2010-10-11 13:28 2202public class User { private in ... -
@MappedSuperclass的用法
2010-10-11 10:21 12589@MappedSuperclass的用法 用在实体的继承过程 ... -
公共dao的结构
2010-09-29 16:17 1337-----------》公共dao的结构 -----共用接口 ... -
No identifier specified for entity
2010-09-29 16:07 11960org.hibernate.AnnotationExcepti ... -
SSJ配置模板
2009-09-14 09:06 859web.xml-----> <?xml versi ... -
Struts----学习笔记 用form提交和sturts提交
2009-09-12 17:02 1193struts是这么配置的 <action path= ... -
Spring学习笔记------Spring和Hibernate的整合配置
2009-09-12 09:15 1390Spring和Hibernate整合配置有两种方式: 方 ... -
Spring学习笔记--------AOP操作
2009-09-10 10:29 1035* AOP操作可与通过注解和xml的方式实现; * 有个问题, ... -
Hibernate学习笔记1--------一个简单的应用
2009-08-30 08:26 994工具类---------> /** *用单例模式 ... -
Hibernate学习笔记2--------------------一对多、多对一简单配置
2009-08-30 08:40 972一的一端------------------------> ...
相关推荐
ssh2框架整合模板。 spring2.5.6,hibernate3.2 基于annotation配置,配置文件内容很少 struts2基于模式匹配,配置文件也很简单。
关于java 的SSH框架,提供了基于配置文件类型的模板。供初学者学习struts、spring、hibernate使用。
spring3,struts2,hibernate3整合模版,各种配置文件你懂得
SSH配置模板[总结].pdf
SSH配置模板[参照].pdf
ssh的jar包,一个模板项目、可直接用、以及ssh的配置文件
在juniper路油器上配置ssh
IDEA 版 SSH 整合模板,使用最新jar包,xml配置。
下载下来只需要自己写dao,daoimpl,action,service。
SSH整合模板,利用注解实现配置。该模板比较常用,利用价值大
ssh框架模板,框架已经搭建好,只需套用。action-service-serviceImpl-dao-daoImpl,pojo中是实体配置文件和实体类。
通过大量代码实践,总结的一套高效实用的ssh模板,包含拦截器的编写及配置,内封装了一套分页工具类,及jsp相应模板,后台只用接受2个参数,即可完成列表展示,代码内有注释,可自行下载学习。
集成好的struts2(2.18)+hibernate3.3+spring2.5代码模板,含有简单person表的操作,数据源,二级缓存等都已经配置好,稍微做修改可以用于学习或做项目
只修改一下generator.properties,(连接数据库的文件),就能根据数据库生成entity,dao,service。。。和一些配置文件,然后把这些copy到自己的项目中去就OK拉 里面附加一个模板
ssh空项目 模版 已包含项目所有包 事务配置 过滤器配置 ssh 架构 空工程 适合 用于新项目架构模版
自己花费几天的时间搭建的SSH框架,经过测试,完全可用的模板,提供给大家,希望对你有帮助。
SSH框架手动搭建实例 经典SSH模板 SSH开发精简完整类包
SSH笔记-Spring JdbcTemplate,使用JdbcTemplate对数据库进行操作,使用具名参数和JDBC模板,简化操作
1.ssh整合的详细步骤说明文档 2.ssh整合规范配置文件清单