<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="mappingResources">
			<list>
				<value>/com/yese/domain/Bulletin.hbm.xml</value>
				<value>/com/yese/domain/User.hbm.xml</value>
				<value>/com/yese/domain/RoleProgram.hbm.xml</value>
				<value>/com/yese/domain/Role.hbm.xml</value>
				<value>/com/yese/domain/QuestionOption.hbm.xml</value>
				<value>/com/yese/domain/Question.hbm.xml</value>
				<value>/com/yese/domain/ProgramRecommend.hbm.xml</value>
				<value>/com/yese/domain/ProgramPhase.hbm.xml</value>
				<value>/com/yese/domain/ProgramDownloadLog.hbm.xml</value>
				<value>/com/yese/domain/ProgramCategory.hbm.xml</value>
				<value>/com/yese/domain/Program.hbm.xml</value>
				<value>/com/yese/domain/Mail.hbm.xml</value>
				<value>/com/yese/domain/ArticleCategory.hbm.xml</value>
			</list>
		</property>
		
		<property name="annotatedClasses">
			<list>
				<value>com.yese.domain.Article</value>
			</list>
		</property>

		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
				<prop key="hibernate.show_sql">true</prop>
				<prop key="hibernate.query.substitutions">true 1, false 0</prop>
				<prop key="hibernate.autoReconnect">true</prop>
				<prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
				<prop key="hibernate.cache.use_query_cache">true</prop>
                <prop key="hibernate.cache.use_second_level_cache">true</prop>
                <prop key="hibernate.cache.provider_class">com.yese.cache.memcached.MemcachedCacheProvider</prop>
                
                <prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider</prop>
                <prop key="hibernate.search.default.indexBase">c:/indexes</prop>
                <!-- 
                <prop key="hibernate.search.analyzer"></prop>
                  -->
				
                <prop key="memcached.servers">192.168.1.32:12000</prop>
				<prop key="memcached.failover">true</prop>
				<prop key="memcached.initConn">10</prop>
				<prop key="memcached.minConn">10</prop>
				<prop key="memcached.maxConn">1000</prop>
				<prop key="memcached.maintSleep">30</prop>
				<prop key="memcached.nagle">false</prop>
				<prop key="memcached.socketTO">3000</prop>
				<prop key="memcached.aliveCheck">true</prop>
				
				<!-- memcached -->
				<!-- 
				<prop key="memcached.org.hibernate.cache.StandardQueryCache">30s</prop>
				<prop key="memcached.org.hibernate.cache.UpdateTimestampsCache">30s</prop>
				<prop key="memcached.com.yese.domain.Article">30s</prop>
				<prop key="memcached.com.yese.domain.Mail">30s</prop>
				 -->
			</props>
		</property>
	</bean>

<property name="mappingResources">指定映射文件
<property name="annotatedClasses">指定annotation类
评论
发表评论

您还没有登录,请登录后发表评论

xly_971223
搜索本博客
博客分类
我的相册
C5b0e206-307c-3f61-aa60-9cfd71c61bb3-thumb
u=3528569133,1587051000&gp=38.jpg
共 2 张
最近加入圈子
存档
最新评论