<?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/netschool?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/Article.hbm.xml</value>
<value>com/aurora/netschool/entity/ClassCategory.hbm.xml</value>
<value>com/aurora/netschool/entity/Category.hbm.xml</value>
<value>com/aurora/netschool/entity/CustomLable.hbm.xml</value>
<value>com/aurora/netschool/entity/KeyWord.hbm.xml</value>
<value>com/aurora/netschool/entity/Template.hbm.xml</value>
<value>com/aurora/netschool/entity/Popedom.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">true</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">
<property name="configureMap">
<props>
<prop key="autoAudit">true</prop>
<prop key="graduateDate">07-08</prop>
</props>
</property>
<property name="directoryMap">
<props>
<prop key="tempDir">/tmp</prop>
<prop key="uploadDir">/upload</prop>
</props>
</property>
</bean>
<bean id="articleDao" class="com.aurora.netschool.dao.impl.ArticleDaoImpl" />
<bean id="administratorDao" class="com.aurora.netschool.dao.impl.AdministratorDaoImpl" />
<bean id="categoryDao" class="com.aurora.netschool.dao.impl.CategoryDaoImpl" />
<bean id="keyWordDao" class="com.aurora.netschool.dao.impl.KeyWordDaoImpl" />
<bean id="templateDao" class="com.aurora.netschool.dao.impl.TemplateDaoImpl" />
<bean id="popedomDao" class ="com.aurora.netschool.dao.impl.PopedomDaoImpl"/>
<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="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>
</beans>
分享到:
相关推荐
spring基本配置
SSH笔记-Spring基本配置方法(注入方式、引用bean、级联属性、集合属性、Properties属性、公用的集合bean、p命名空间)
NULL 博文链接:https://qinglonghai.iteye.com/blog/569205
Spring AOP配置的实例,最基本的Spring AOP配置
Spring+MyBatis含分页的基本配置,加入json方式异常处理
spring在英文里有春天、弹簧、...Spring使用基本的JavaBean来完成以前只可能由EJB完成的事情。然而,Spring的用途不仅限于服务器端的开发。从简单性、可测试性和松耦合的角度而言,任何Java应用都可以从Spring中受益。
Spring Security 基本使用和配置代码,学习之后自己练习,
这个文档时具体配置spring cloud的基本组件的注解和依赖包的文档,上次上传的spring cloud的是纯理论的,这个是具体实现;
spring简单实例,一看就懂,介绍spring基本配置
applicationContext.xml 基本配置详解
尽管Spring Framework可以做很多事,但依赖注入却是Spring容器提供的最基本的功能。 任何稍微复杂一点的应用程序都至少由两个或两个以上的对象协作在一起,共同完成一些业务逻辑。以往的Java企业开发,每个对象都要...
基于xml的配置和注解的配置,方便Spring的学习 配置好的仓库:https://download.csdn.net/download/weixin_41957626/87463114?spm=1001.2014.3001.5501 maveb的集成:...
关于spring的基本知识,高手就免看了.
springMvc的基本配置文件注释一些注解类,需要的可以看看
Spring Cloud搭建基本服务配置: 1.Eureka 2.Ribbon 3.Feign 4.HyStrix 5.Zuul 6.Spring Config
01_Spring Security基本使用和配置 ;01_Spring Security基本使用和配置;持续更新中.....
Spring启动基础 Spring启动的基本配置