|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
<?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
|
|
|
|
|
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">
|
|
|
|
@ -16,7 +16,7 @@
|
|
|
|
|
</property>
|
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
<!-- ********************************* 基础配置 ********************************* -->
|
|
|
|
|
<!-- ********************************* 基础配置 ********************************* -->
|
|
|
|
|
|
|
|
|
|
<!-- 配置01、JobHandler 扫描路径 -->
|
|
|
|
|
<context:component-scan base-package="com.xxl.job.executor.service.jobhandler" />
|
|
|
|
@ -27,34 +27,13 @@
|
|
|
|
|
<property name="ip" value="${xxl.job.executor.ip}" />
|
|
|
|
|
<!-- 执行器端口号 -->
|
|
|
|
|
<property name="port" value="${xxl.job.executor.port}" />
|
|
|
|
|
<property name="appName" value="${xxl.job.executor.appname}" />
|
|
|
|
|
<!-- 执行器注册器 -->
|
|
|
|
|
<property name="registHelper" >
|
|
|
|
|
<!-- 执行器 "DbRegistHelper" 依赖 "XXL-JOB公共数据源" ;推荐将其抽象为RPC远程服务, 可取消对JDBC的依赖;如不启用执行自动注册功能,也可忽略JDBC配置; -->
|
|
|
|
|
<bean class="com.xxl.job.core.registry.impl.DbRegistHelper" >
|
|
|
|
|
<!-- XXL-JOB公共数据源 -->
|
|
|
|
|
<property name="dataSource" ref="xxlJobDataSource" />
|
|
|
|
|
</bean>
|
|
|
|
|
</property>
|
|
|
|
|
<!-- 执行器AppName,为空则关闭自动注册 -->
|
|
|
|
|
<property name="appName" value="${xxl.job.executor.appname}" />
|
|
|
|
|
<!-- 执行器注册中心地址,为空则关闭自动注册 -->
|
|
|
|
|
<property name="adminAddresses" value="${xxl.job.admin.addresses}" />
|
|
|
|
|
<!-- 执行器日志路径 -->
|
|
|
|
|
<property name="logPath" value="${xxl.job.executor.logpath}" />
|
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
<!-- ********************************* "XXL-JOB公共数据源" 配置, 仅在启动 "DbRegistHelper" 时才需要, 否则可删除 ********************************* -->
|
|
|
|
|
|
|
|
|
|
<!-- 配置03、XXL-JOB公共数据源 -->
|
|
|
|
|
<bean id="xxlJobDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
|
|
|
|
|
<property name="driverClass" value="${xxl.job.db.driverClass}" />
|
|
|
|
|
<property name="jdbcUrl" value="${xxl.job.db.url}" />
|
|
|
|
|
<property name="user" value="${xxl.job.db.user}" />
|
|
|
|
|
<property name="password" value="${xxl.job.db.password}" />
|
|
|
|
|
<property name="initialPoolSize" value="3" />
|
|
|
|
|
<property name="minPoolSize" value="2" />
|
|
|
|
|
<property name="maxPoolSize" value="10" />
|
|
|
|
|
<property name="maxIdleTime" value="60" />
|
|
|
|
|
<property name="acquireRetryDelay" value="1000" />
|
|
|
|
|
<property name="acquireRetryAttempts" value="10" />
|
|
|
|
|
<property name="preferredTestQuery" value="SELECT 1" />
|
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</beans>
|