<?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="byName">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://hunan/netschoolforjanson?useUnicode=true&characterEncoding=gbk</value>
</property>
<property name="username">
<value>netschool</value>
</property>
<property name="password">
<value>123456</value>
</property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="mappingResources">
<list>
<value>com/aurora/netschool/entity/Administrator.hbm.xml</value>
。。。
<value>com/aurora/netschool/entity/User.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.query.substitutions">true=1 false=0</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.use_outer_join">true</prop>
</props>
</property>
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean>
<bean name="valueListFactory" class="com.aurora.util.valuelist.ValueListFactory">
<property name="constantsHolder">
<value>com.aurora.netschool.Constants</value>
</property>
</bean>
<bean name="configuration" class="com.aurora.Configuration" destroy-method="saveConfig">
<property name="configureFile">
<value>configure.properties</value>
</property>
<property name="directoryFile">
<value>directory.properties</value>
</property>
</bean>
<bean id="articleDao" class="com.aurora.netschool.dao.impl.ArticleDaoImpl" />
。。。
<bean id="cardDao" class="com.aurora.netschool.dao.impl.CardDaoImpl" />
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="baseTxProxy" abstract="true" lazy-init="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
<property name="proxyTargetClass">
<value>true</value>
</property>
</bean>
<bean id="loginService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.LoginServiceImpl" />
</property>
</bean>
<bean id="articleService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.ArticleServiceImpl" />
</property>
</bean>
<bean id="administratorService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.AdministratorServiceImpl" />
</property>
</bean>
<bean id="popedomService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.PopedomServiceImpl" />
</property>
</bean>
<bean id="categoryService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.CategoryServiceImpl" />
</property>
</bean>
<bean id="keyWordService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.KeyWordServiceImpl" />
</property>
</bean>
<bean id="templateService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.TemplateServiceImpl" />
</property>
</bean>
<bean id="specialService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.SpecialServiceImpl" />
</property>
</bean>
<bean id="pageGenerationService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.PageGenerationServiceImpl" />
</property>
</bean>
<bean id="commentsService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.CommentsServiceImpl" />
</property>
</bean>
<bean id="commonUserService" parent="baseTxProxy">
<property name="target">
<bean class="com.aurora.netschool.service.impl.CommonUserServiceImpl" />
</property>
</bean>
<bean id="searchEngineService" class="com.aurora.netschool.service.impl.SearchEngineServiceImpl" />
<bean id="freemarker_cfg" class="freemarker.template.Configuration">
<property name="dateFormat">
<value>yyyy年MM月dd日</value>
</property>
<property name="dateTimeFormat">
<value>yyyy年MM月dd日 HH点mm分</value>
</property>
</bean>
<bean id="annotationConfiguration" class="org.compass.annotations.config.CompassAnnotationsConfiguration"></bean>
<bean id="compass" class="org.compass.spring.LocalCompassBean">
<property name="classMappings">
<list>
<value>com.aurora.netschool.entity.Article</value>
<value>com.aurora.netschool.entity.Category</value>
</list>
</property>
<property name="compassConfiguration" ref="annotationConfiguration" />
<property name="compassSettings">
<props>
<prop key="compass.engine.connection">file://${pathIndex}</prop>
<prop key="compass.transaction.factory">org.compass.spring.transaction.SpringSyncTransactionFactory</prop>
</props>
</property>
<property name="transactionManager" ref="transactionManager" />
</bean>
<bean id="compassGps" class="org.compass.gps.impl.SingleCompassGps" init-method="start" destroy-method="stop" autowire="no">
<property name="compass" ref="compass" />
<property name="gpsDevices">
<list>
<bean class="org.compass.spring.device.hibernate.SpringHibernate3GpsDevice" autowire="no">
<property name="name">
<value>hibernateDevice</value>
</property>
<property name="sessionFactory" ref="sessionFactory" />
<property name="mirrorDataChanges">
<value>false</value>
</property>
</bean>
</list>
</property>
</bean>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:directory.properties</value>
<value>classpath:configure.properties</value>
</list>
</property>
</bean>
<bean id="methodInvokingJobDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject"><ref bean="compassGps"/></property>
<property name="targetMethod"><value>index</value></property>
</bean>
<bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail"><ref bean="methodInvokingJobDetail"/></property>
<property name="cronExpression"><value>${autoTime}</value></property>
</bean>
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean" autowire="no">
<property name="triggers"><list><ref local="cronTrigger"/></list></property>
</bean>
</beans>