bboss与spring中配置和引用bboss数据源和bboss dao组件方法说明

首先在项目中导入bboss 持久层包:
maven坐标
<dependency> 
    <groupId>com.bbossgroups</groupId> 
    <artifactId>bboss-persistent</artifactId> 
    <version>5.0.3.5</version> 
</dependency> 

gradle坐标
compile 'com.bbossgroups:bboss-persistent:5.0.3.5'

    在bboss中引用bboss数据源:
  <property name="dataSource" factory-class="com.frameworkset.common.poolman.util.SQLManager" factory-method="getTXDatasourceByDBName">  
        <construction>  
            <property value="wood" />  
        </construction>  
    </property>  

   
   
   在spring中引用bboss数据源:
    <bean id="dataSource" 
         class="com.frameworkset.common.poolman.util.SQLManager"
         factory-method="getTXDatasourceByDBName">
         <constructor-arg value="wood"></constructor-arg>
     </bean>

    
    bboss ioc 配置bboss dao组件并加载sql配置文件
    
 
 <property name="appbom.configsqlexecutor"		
		class="com.frameworkset.common.poolman.ConfigSQLExecutor" >
		<construction>
			<property value="com/sany/appbom/service/appbom.xml"/>
		</construction>
		
	</property>


spring ioc 配置bboss dao组件并加载sql配置文件
<bean id="appbom.configsqlexecutor" class="com.frameworkset.common.poolman.ConfigSQLExecutor">  		                          
    	<constructor-arg value="com/sany/appbom/service/appbom.xml" type="String" index ="1"></constructor-arg>                          
	</bean>
上一篇:YII 快速创建项目GII


下一篇:阿里巴巴复杂搜索系统的可靠性优化之路