`
Vince_Lee
  • 浏览: 62567 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

spring配置文件

阅读更多

<?xml version="1.0" encoding="UTF-8"?>  
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"  
    xmlns:context="http://www.springframework.org/schema/context"  
    xsi:schemaLocation="  
          http://www.springframework.org/schema/beans   
          http://www.springframework.org/schema/beans/spring-beans-2.0.xsd  
          http://www.springframework.org/schema/aop   
          http://www.springframework.org/schema/aop/spring-aop-2.0.xsd  
          http://www.springframework.org/schema/tx   
          http://www.springframework.org/schema/tx/spring-tx-2.0.xsd  
          http://www.springframework.org/schema/context  
          http://www.springframework.org/schema/context/spring-context-2.5.xsd"> 
          
	<bean id="dataSource"
		class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
		<property name="driverClassName"
			value="oracle.jdbc.driver.OracleDriver">
		</property>
		<property name="url"
			value="jdbc:oracle:thin:@192.168.0.119:1521:ubest">
		</property>
		<property name="username" value="oracle"></property>
		<property name="password" value="oracle"></property>
		
		<!-- Connection Pooling Info -->
	  <property name="initialSize" value="5" />
	  <property name="maxActive" value="100" />
	  <property name="maxIdle" value="30" />
	  <property name="maxWait" value="1000" />
	  <property name="poolPreparedStatements" value="false" />
	  <property name="defaultAutoCommit" value="true" />
	
	</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">
					org.hibernate.dialect.Oracle9Dialect
				</prop>
				<prop key="hibernate.show_sql"> 
					true
				</prop>
				<prop key="format_sql">
					true
				</prop>
			</props>
		</property>
		<property name="mappingResources">
			<list>
				<value>com/bc/bean/AdminSheet.hbm.xml</value>
				<value>com/bc/bean/AdInformationSheet.hbm.xml</value>
				<value>
					com/bc/bean/InformationParentSheet.hbm.xml
				</value>
				<value>com/bc/bean/InformationSheet.hbm.xml</value>
				<value>com/bc/bean/IntentCustomerSheet.hbm.xml</value>
				<value>com/bc/bean/PortalSheet.hbm.xml</value>
				<value>com/bc/bean/PicNewsSheet.hbm.xml</value>
				
			</list>
		</property>
	</bean>
	
	<bean id="Dao" class="com.bc.dao.impl.daoImpl">
		<property name="sessionFactory">
			<ref bean="sessionFactory"/>
		</property>
	</bean>
	
	<bean id="UserService" class="com.bc.service.impl.userServiceImpl">
		<property name="dao">
			<ref bean="Dao"/>
		</property>
		<property name="sessionFactory">
			<ref bean="sessionFactory"/>
		</property>
	</bean>
	
	<!-- 定义事务管理Bean-->
	
	<bean id="transactionManager"
		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory">
			<ref bean="sessionFactory"/>
		</property>
	</bean>
	
	<!-- 定义事务传播特性 -->
	
	<tx:advice id="txadvice" transaction-manager="transactionManager">
		<tx:attributes>
			<tx:method name="*find*" propagation="NOT_SUPPORTED" read-only="true"/>
			<tx:method name="*add*" propagation="REQUIRED"/>
			<tx:method name="*remove*" propagation="REQUIRED"/>
			<tx:method name="*update*" propagation="REQUIRED"/>
		</tx:attributes>
	</tx:advice>
	
	<!-- 定义切面 -->
	
	<aop:config>
		<aop:pointcut id="aoppoint" expression="execution(* com.bc.service.impl.userServiceImpl.*.*(..))"/>
		<aop:advisor advice-ref="txadvice" pointcut-ref="aoppoint"/>
	</aop:config>
	
	<!-- 配置Action -->
	
	<bean id="addInfoParAction" class="com.bc.web.AddInfoParAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListInfoParAction" class="com.bc.web.ListInfoParAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListInfoPar2Action" class="com.bc.web.ListInfoPar2Action" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="RemoveInfoParAction" class="com.bc.web.RemoveInfoParAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdatePInfoParAction" class="com.bc.web.UpdatePInfoParAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdatePInfoAction" class="com.bc.web.UpdatePInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdatePADInfoAction" class="com.bc.web.UpdatePADInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdateInfoParAction" class="com.bc.web.UpdateInfoParAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	
	<bean id="UpdateInfoAction" class="com.bc.web.UpdateInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdateRecNewsAction" class="com.bc.web.UpdateRecNewsAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdateHeadlineAction" class="com.bc.web.UpdateHeadlineAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdateADInfoAction" class="com.bc.web.UpdateADInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="AddInfoAction" class="com.bc.web.AddInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="AddADInfoAction" class="com.bc.web.AddADInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="AddIntCustomerAction" class="com.bc.web.AddIntCustomerAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListInfoAction" class="com.bc.web.ListInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListInfo2BCWebIndexAction" class="com.bc.web.ListInfo2BCWebIndexAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListInfoByInfoParId2WebAction" class="com.bc.web.ListInfoByInfoParId2WebAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	
	
	<bean id="ListInfo2PointFamilyAction" class="com.bc.web.ListInfo2PointFamilyAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListInfoDetailByIfIdAction" class="com.bc.web.ListInfoDetailByIfIdAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListInfo2BCTrendsAction" class="com.bc.web.ListInfo2BCTrendsAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListRecNewsAction" class="com.bc.web.ListRecNewsAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListHeadlineNewsAction" class="com.bc.web.ListHeadlineNewsAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListInfoByInfoParIdAction" class="com.bc.web.ListInfoByInfoParIdAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListInfoByInfoParId2BackAction" class="com.bc.web.ListInfoByInfoParId2BackAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	

	
	<bean id="ListADInfoAction" class="com.bc.web.ListADInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListIntCustomerAction" class="com.bc.web.ListIntCustomerAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="RemoveInfoAction" class="com.bc.web.RemoveInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="RemoveInfoPictureAction" class="com.bc.web.RemoveInfoPictureAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="RemoveADInfoAction" class="com.bc.web.RemoveADInfoAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	<bean id="SplitPageAction" class="com.bc.web.SplitPageAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="IsRecAction" class="com.bc.web.IsRecAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="IsHeadAction" class="com.bc.web.IsHeadAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="IsPicAction" class="com.bc.web.IsPicAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="PortalFlashAction" class="com.bc.web.PortalFlashAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="ListFocusNewsAction" class="com.bc.web.ListFocusNewsAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdatePPortalFlashAction" class="com.bc.web.UpdatePPortalFlashAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdatePFocusNewsAction" class="com.bc.web.UpdatePFocusNewsAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdatePortalAction" class="com.bc.web.UpdatePortalAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
	<bean id="UpdateFocusAction" class="com.bc.web.UpdateFocusAction" scope="prototype">
		<property name="userService">
			<ref bean="UserService"/>
		</property>
	</bean>
	
</beans>
 
分享到:
评论

相关推荐

    spring配置文件加密实现

    为了保护这些敏感信息不被非法访问或篡改,我们可以对Spring配置文件进行加密处理。本文将深入探讨如何在Java环境中,利用TE网络技术实现Spring配置文件的加密。 首先,我们需要理解Spring配置文件的基本结构。...

    spring配置文件实例

    spring配置文件实例

    spring配置文件详解

    Spring 配置文件详解 Spring 配置文件是 Spring 框架中最重要的配置文件之一,它负责定义和配置应用程序的Bean对象,以及它们之间的依赖关系。Spring 配置文件通常以XML文件的形式存在,文件名通常为...

    spring配置文件模板

    《Spring配置文件模板详解》 在Java开发领域,Spring框架以其强大的依赖注入(Dependency Injection,简称DI)和面向切面编程(Aspect-Oriented Programming,简称AOP)能力,成为了企业级应用开发的重要选择。而...

    spring 配置文件详解

    Spring 配置文件详解 Spring 配置文件是指-guide Spring 工厂进行 Bean 生产、依赖关系注入(装配)及 Bean 实例分发的“图纸”。Java EE 程序员必须学会并灵活应用这份“图纸”准确地表达自己的“生产意图”。...

    spring配置文件详解,每一步都含有注释

    spring配置文件详解,交你如何理解spring,熟练运用spring

    spring配置文件详细介绍

    下面是对Spring配置文件的详细介绍。 首先,Spring配置文件通常是以`.xml`为扩展名的文件,例如`beans.xml`。这些文件存储在项目的`src/main/resources`目录下,以便在运行时被自动加载。Spring容器...

    spring配置文件:整理总结Spring中XML配

    ### Spring配置文件:整理与总结Spring中XML配置的最佳实践 #### 概述 Spring框架作为一个强大的Java应用框架,在企业级应用开发中占据了重要的地位。它为普通的Java对象(Plain Old Java Objects, POJOs)提供了...

    Spring配置文件集合

    在本压缩包中,我们找到了一系列与Spring相关的配置文件,这些文件在构建JavaWeb应用时起着至关重要的作用。 1. `jdbc.properties`: 这个文件通常用于存储数据库连接的相关信息,如URL、用户名、密码等。它是Spring...

    xbean简化spring配置文件.doc

    xbean简化spring配置文件 xbean是 Apache Geronimo 项目的一个子项目,旨在简化Spring配置文件的编写。下面我们来详细介绍如何使用xbean简化Spring配置文件。 在Spring之前,我们使用Factory模式来管理bean。例如...

    如何加载jar包中的spring配置文件

    在Spring MVC项目中,加载jar包中的Spring配置文件是一个常见的需求,特别是在进行SSM(Spring、Spring MVC、MyBatis)整合时。SSM框架的整合通常涉及到多个配置文件的组织和管理,其中一部分配置可能会被打包到独立...

    hibernate+spring配置文件

    标题"hibernate+spring配置文件"指出了我们需要关注的重点,即如何将这两个框架协同工作。首先,我们需要在Spring的配置文件中引入Hibernate的相关bean,通常命名为`applicationContext.xml`。这个文件是Spring的IoC...

    加载jar包中的spring配置文件

    标题"加载jar包中的spring配置文件"涉及到的关键技术点如下: 1. **类路径(Classpath)**:类路径是Java运行环境查找.class文件的路径,它决定了Java虚拟机在执行程序时如何找到所需的类。可以通过`-cp`或`-...

    myeclipse中spring配置文件输入提示配置.docx

    ### MyEclipse中Spring配置文件输入提示配置详解 #### 一、问题背景及解决思路概述 在使用MyEclipse进行Java开发时,特别是在涉及到Spring框架的应用中,经常会遇到配置文件编辑过程中缺乏智能提示的问题。这对于...

    Spring配置文件:注入数据时配置文件的配置格式

    Spring配置文件:注入各种数据时配置文件的配置格式

    spring 配置文件详解.txt

    ### Spring配置文件详解 #### 一、Spring框架与配置文件的重要性 Spring框架是Java平台上的一个开源框架,它提供了一种轻量级的方式来管理和组织Java应用程序中的组件。Spring框架的核心特性之一是依赖注入...

Global site tag (gtag.js) - Google Analytics