All Downloads are FREE. Search and download functionalities are using the official Maven repository.

boot-starter-uflo.2.4.2.v20201205.source-code.uflo-spring-context.xml Maven / Gradle / Ivy

There is a newer version: 2.5.1.v20220215
Show newest version
<?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:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
    ">
	<!-- 导入nutzboot的spring定义 -->
	<import resource="classpath:META-INF/spring/nutzboot-spring-context.xml" />
	<!-- 导入uflo的spring定义 -->
	<import resource="classpath:uflo-console-context.xml" />
	<!-- uflo需要一个EnvironmentProvider -->
	<bean id="uflo.environmentProvider" class="org.nutz.boot.starter.uflo.UfloEnvironmentProvider">
		<property name="platformTransactionManager" ref="uflo.transactionManager" />
		<property name="sessionFactory" ref="uflo.sessionFactory" />
	</bean>
	<!-- uflo总是依赖hibernate,那就给它咯 -->
	<bean id="uflo.sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
		<property name="dataSource" ref="nutz.dataSource" />
		<property name="packagesToScan">
			<list>
				<value>com.bstek.uflo.model*</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.show_sql">true</prop>
				<prop key="hibernate.hbm2ddl.auto">update</prop>
			</props>
		</property>
	</bean>
	<!-- 还需要事务管理器 -->
	<bean id="uflo.transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
		<property name="sessionFactory" ref="uflo.sessionFactory"/>
	</bean>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy