现在的项目是使用的struts1+hibernate3.0+spring
原来加载的spring的配置2个,启动速度还可以,80s 可以搞定,但是删除一个模块之后,只剩下applicationContext。xml配置,启动的时候Initializing Spring root WebApplicationContext 起码需要5分钟,找不到原因!!!!
这是applicationContext的部分配置, <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "/WEB-INF/tld/spring-beans.dtd">
<beans>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:/propfiles/dbConnection.properties</value>
</property>
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>${drivername}</value>
</property>
<property name="url">
<value>${url}</value>
</property>
<property name="username">
<value>${username}</value>
</property>
<property name="password">
<value>${password}</value>
</property>
<property name="maxActive">
<value>${jdbc.maxActive}</value>
</property>
<property name="maxIdle">
<value>${jdbc.maxIdle}</value>
</property>
<property name="maxWait">
<value>${jdbc.maxWait}</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.show_sql">true</prop><!-- ${hibernate.show_sql}-->
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<!-- <prop key="hibernate.cglib.use_reflection_optimizer">-->
<prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
<prop key="hibernate.query.substitutions">true=1,false=0</prop>
<prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
<prop key="hibernate.default_batch_fetch_size">${hibernate.default_batch_fetch_size}</prop>
<prop key="org.hibernate.hql.ast.ASTQueryTranslatorFactory"></prop>
<!--
<prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>
-->
</props>
</property>
原来加载的spring的配置2个,启动速度还可以,80s 可以搞定,但是删除一个模块之后,只剩下applicationContext。xml配置,启动的时候Initializing Spring root WebApplicationContext 起码需要5分钟,找不到原因!!!!
这是applicationContext的部分配置, <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "/WEB-INF/tld/spring-beans.dtd">
<beans>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:/propfiles/dbConnection.properties</value>
</property>
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>${drivername}</value>
</property>
<property name="url">
<value>${url}</value>
</property>
<property name="username">
<value>${username}</value>
</property>
<property name="password">
<value>${password}</value>
</property>
<property name="maxActive">
<value>${jdbc.maxActive}</value>
</property>
<property name="maxIdle">
<value>${jdbc.maxIdle}</value>
</property>
<property name="maxWait">
<value>${jdbc.maxWait}</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.show_sql">true</prop><!-- ${hibernate.show_sql}-->
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<!-- <prop key="hibernate.cglib.use_reflection_optimizer">-->
<prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
<prop key="hibernate.query.substitutions">true=1,false=0</prop>
<prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
<prop key="hibernate.default_batch_fetch_size">${hibernate.default_batch_fetch_size}</prop>
<prop key="org.hibernate.hql.ast.ASTQueryTranslatorFactory"></prop>
<!--
<prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>
-->
</props>
</property>
解决方案 »
- ant打包项目成jar包,怎么让让MANIFEST.MF里面带有版本信息
- 请问 struts2 一个表单同事有两个file控件的文件上传,怎么处理
- HttpSession httpSession = ServletActionContext.getRequest().getSession()
- 请教关于struts2中ValueStack的用法!着急,在线等!!!
- struts、hibernate、spring这三个框架和J2EE是什么关系?
- 到日企面试
- 嵌套标签问题
- 急!求《J2EE应用与BEA WebLogic Server第2版》一书配套的源代码
- axis用AdminClient配置为什么会出错?
- 高分求教小问题
- float 数据库写入问题
- JMS 是否可以传输图片,请给个例子!谢谢! 在线等待@
tomcat work文件夹下的东西,你试试吧.
所有的pojo映射文件使用规范都是hibernate2的.
老项目啊,包包多多滴。