Spring2.5换成Spring3.0出现Cannot cache an unknown entity异常 本帖最后由 Android_Robot 于 2012-05-25 13:16:24 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Spring在web.xml中的配置 <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring-cfg/applicationContext*.xml </param-value> </context-param>spring配置文件<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"><beans default-autowire="autodetect"> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="configLocation"> <value>classpath:hibernate.cfg.xml</value> </property> </bean> <bean id="dao" class="com.xxx.yyy.dao.impl.NDDCommonDaoImpl"> <property name="sessionFactory" ref="sessionFactory"></property> </bean></beans> JavaWeb中常用的WEB服务器有哪些? 有谁熟悉 模型驱动设计 和 ORM 延时加载么? 熟悉Jaspersoft iReport3.7.6 的瞧瞧 Luene高亮显示,超过一个汉字就不行? js如何浏览硬盘内容 全局变量与局部变量的极其问题 简单一问 关于把TOMCAT8080端口改为80的问题。 j2ee怎么用?100分 有没有EJB高手,真正的那种。有的话麻烦看看。 json格式的数据如何转换成map保存到数据库? Oracle求触发器写法
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring-cfg/applicationContext*.xml
</param-value>
</context-param>spring配置文件<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="autodetect"> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
</bean>
<bean id="dao" class="com.xxx.yyy.dao.impl.NDDCommonDaoImpl">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
</beans>