12345678910111213141516171819202122232425262728293031 |
- <?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:context="http://www.springframework.org/schema/context"
- xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:jpa="http://www.springframework.org/schema/data/jpa"
- xmlns:task="http://www.springframework.org/schema/task"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
- http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
- http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
- http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd"
- default-lazy-init="true">
- <task:executor id="executor" pool-size="10" />
- <!-- 名字必须是applicationEventMulticaster和messageSource是一样的,默认找这个名字的对象 -->
- <!-- 名字必须是applicationEventMulticaster,因为AbstractApplicationContext默认找个 -->
- <!-- 如果找不到就new一个,但不是异步调用而是同步调用 -->
- <bean id="applicationEventMulticaster" class="org.springframework.context.event.SimpleApplicationEventMulticaster">
- <!-- 注入任务执行器 这样就实现了异步调用(缺点是全局的,要么全部异步,要么全部同步(删除这个属性即是同步)) -->
- <!-- <property name="taskExecutor" ref="executor" /> -->
- </bean>
- <bean id="searchListener" class="com.fsm.cms.search.SearchListener" />
- <bean id="staticListener" class="com.fsm.cms.statics.StaticListener" />
- <!-- 用户角色关系发生变化时,同步至activiti -->
- <bean id="userRoleListener" class="com.fsm.workflow.UserRoleListener" />
- </beans>
|