|
|
|
@ -7,33 +7,29 @@
|
|
|
|
|
http://www.springframework.org/schema/context
|
|
|
|
|
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
|
|
|
|
|
|
|
|
|
<!-- scan job handler -->
|
|
|
|
|
<context:component-scan base-package="com.xxl.job.executor" />
|
|
|
|
|
<!-- 配置01、JobHandler 扫描路径 -->
|
|
|
|
|
<context:component-scan base-package="com.xxl.job.executor.service.jobhandler" />
|
|
|
|
|
|
|
|
|
|
<!-- 执行器
|
|
|
|
|
……………………………………………………………………………………………………………………
|
|
|
|
|
port : 执行器端口号
|
|
|
|
|
-->
|
|
|
|
|
<!-- 配置02、执行器 -->
|
|
|
|
|
<bean id="xxlJobExecutor" class="com.xxl.job.core.executor.jetty.XxlJobExecutor" init-method="start" destroy-method="destroy" >
|
|
|
|
|
<!-- 执行器端口号 -->
|
|
|
|
|
<property name="port" value="9999" />
|
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
<!-- glue factory (开启GLUE任务时才需要, 否则可以删除)
|
|
|
|
|
……………………………………………………………………………………………………………………
|
|
|
|
|
cacheTimeout : GLUE任务示例缓存失效时间, 单位/ms
|
|
|
|
|
glueLoader : GLUE 代码加载器,推荐将该服务配置成RPC服务
|
|
|
|
|
dataSource : XXL-JOB公共数据源
|
|
|
|
|
-->
|
|
|
|
|
<!-- 配置03、GlueFactory (启用GLUE任务时才需要, 否则可删除) -->
|
|
|
|
|
<bean id="glueFactory" class="com.xxl.job.core.glue.GlueFactory">
|
|
|
|
|
<!-- GLUE任务示例缓存失效时间, 单位/ms -->
|
|
|
|
|
<property name="cacheTimeout" value="10000" />
|
|
|
|
|
<!-- GLUE 代码加载器,推荐将该服务配置成RPC服务 -->
|
|
|
|
|
<property name="glueLoader" >
|
|
|
|
|
<bean class="com.xxl.job.core.glue.loader.impl.DbGlueLoader" >
|
|
|
|
|
<!-- XXL-JOB公共数据源 -->
|
|
|
|
|
<property name="dataSource" ref="dataSource" />
|
|
|
|
|
</bean>
|
|
|
|
|
</property>
|
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
<!-- XXL-JOB公共数据源 (开启GLUE任务时才需要, 否则可以删除) -->
|
|
|
|
|
<!-- 配置04、XXL-JOB公共数据源 (启用GLUE任务, 且使用 "DbGlueLoader" 作为 "GLUE源码加载器" 时才需要, 否则可删除) -->
|
|
|
|
|
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
|
|
|
|
|
<property name="driverClass" value="${c3p0.driverClass}" />
|
|
|
|
|
<property name="jdbcUrl" value="${c3p0.url}" />
|
|
|
|
|