ssh(struts2.3.8+spring3.2+heibernate4.1+annotation零配置实例



ssh(struts2.3.8+spring3.2+heibernate4.1+annotation零配置实例讲解开发配置过程步骤,实例源码下载.

公司一直不是ssh零配置的框架,每次写action都要在applicationcontext和struts里面配置,好麻烦,最近有空,写了一个ssh零配置的框架

这里写了一个小的项目,以用户权限管理为例

先做准备工作:

1.struts2去官网下载最新版struts开发包http://struts.apache.org/download.cgi#struts216

2.hibernate4去官网下载最新版hiberna[......]

Read more

spring配置多个hibernate.cfg.xml



说:
在Hibernate-content.xml中
说:
<bean id=”sessionFactory”
class=”org.springframework.orm.hibernate3.LocalSessionFactoryBean”>
< property name=”dataSource” ref=”dataSource” />
< property name=”configLocations”
value=”classpath:hibernate.cfg.xml” />

说:
classpath:hibernate.cf[......]

Read more

通过路径获取Hibernate.cfg.xml配置文件

通过路径获取Hibernate.cfg.xml配置文件.搜索

2008-11-13 11:08枫舞阳|分类:JAVA相关| 浏览3859次
Hibernate.cfg.xml路径默认的是在src下 现在我不想把它放在这里 想放在WEB-INF下 那么我在哪应该制定他的路径 注:我不使用spring
如何制定路径我想知道 光拖到WEB-INF怎么可能行
分享到:

2008-11-13 20:11提问者采纳
sessionFactory = new Configuration().configure("WEB-INF/hibernate.cfg.xm[......]

Read more

hibernate学习笔记–(org.hibernate.HibernateException: ../hibernate.cfg.xml not found错误的解决)

hibernate学习笔记–(org.hibernate.HibernateException: ../hibernate.cfg.xml not found错误的解决)

如果你在myeclipse开发中,使用了hibernate,那么使用myeclipse生产hibernate.cfg.xml的映射,此时,在编译是就会出现错误org.hibernate.HibernateException:
../hibernate.cfg.xml not found,错误的出现原因,因为hibernate.cfg.xml文件的位置实际是按照Java build
path对话框的src路径下的第一项[......]

Read more

hibernate修改了xml配置文件的文件名的处理方式

hibernate修改了配置文件的文件名的处理方式.

hibernate默认的配置文件时hibernate.cfg.xml文件,但是如果修改了配置文件,不做处理,

Configuration().configure().buildSessionFactory();的方式去解析hibernate.cfg.xml,则会报

org.hibernate.HibernateException: /hibernate.cfg.xml not found       at org.hibernate.util.ConfigHelper.getResourceAsStream(Co[......]

Read more

Hibernate Annotations中文参考文档

Hibernate Annotations中文参考文档.

3.2.0 CR1

Read more

马士兵Hibernate -annotation 学习笔记十分详细

马士兵Hibernate -annotation 学习笔记十分详细.

Read more

小型用户登陆权限例子struts2.18+spring3.0+hibernate3.5+annotation(源码)

小型用户权限例子struts2.18+spring3.0+hibernate3.5+annotation(源码)实例.今天是2010年的最后一天,在此分享一下个人几个月前写的一个小项目给大家    1.系统框架:struts2.8+hibernate3.5+spring3.0
2.浏览器: 因为开发是一直使用的是chrome,开发完后才发现不兼容ie
3.注意事项:如果出现java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z 由于hibernate-jpa-2.0-api-1.0.0.Final.[......]

Read more

Hibernate对Annotation的扩展解读

Hibernate对Annotation的扩展解读.Hibernate 3.1 提供了多种附加的注解,这些注解可以与EJB3的实体混合/匹配使用。
他们被设计成EJB3注解的自然扩展。
To empower the EJB3 capabilities, hibernate provides specific
annotations that match hibernate features. The
org.hibernate.annotations package contains all
these annotations extensions.
为了强化EJB3的能力,Hib[......]

Read more