|
|
|
@ -7,6 +7,15 @@
|
|
|
|
|
http://www.springframework.org/schema/context
|
|
|
|
|
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
|
|
|
|
|
|
|
|
|
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
|
|
|
|
<property name="fileEncoding" value="utf-8" />
|
|
|
|
|
<property name="locations">
|
|
|
|
|
<list>
|
|
|
|
|
<value>classpath*:xxl-job-executor.properties</value>
|
|
|
|
|
</list>
|
|
|
|
|
</property>
|
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
<!-- ********************************* 基础配置 ********************************* -->
|
|
|
|
|
|
|
|
|
|
<!-- 配置01、JobHandler 扫描路径 -->
|
|
|
|
@ -15,10 +24,10 @@
|
|
|
|
|
<!-- 配置02、执行器 -->
|
|
|
|
|
<bean id="xxlJobExecutor" class="com.xxl.job.core.executor.XxlJobExecutor" init-method="start" destroy-method="destroy" >
|
|
|
|
|
<!-- 执行器IP[选填],为空则自动获取 -->
|
|
|
|
|
<!--<property name="ip" value="" />-->
|
|
|
|
|
<property name="ip" value="${xxl.job.executor.ip}" />
|
|
|
|
|
<!-- 执行器端口号 -->
|
|
|
|
|
<property name="port" value="9999" />
|
|
|
|
|
<property name="appName" value="xxl-job-executor-example" />
|
|
|
|
|
<property name="port" value="${xxl.job.executor.port}" />
|
|
|
|
|
<property name="appName" value="${xxl.job.executor.appname}" />
|
|
|
|
|
<!-- 执行器注册器,默认使用系统提供的 "DbRegistHelper", 推荐将其改为公共的RPC服务 -->
|
|
|
|
|
<property name="registHelper" >
|
|
|
|
|
<!-- DbRegistHelper, 依赖 "XXL-JOB公共数据源" -->
|
|
|
|
@ -34,7 +43,7 @@
|
|
|
|
|
<!-- 配置03、GlueFactory -->
|
|
|
|
|
<bean id="glueFactory" class="com.xxl.job.core.glue.GlueFactory">
|
|
|
|
|
<!-- GLUE任务示例缓存失效时间, 单位/ms -->
|
|
|
|
|
<property name="cacheTimeout" value="10000" />
|
|
|
|
|
<property name="cacheTimeout" value="${xxl.job.glue.cache.time}" />
|
|
|
|
|
<!-- GLUE源码加载器,默认使用系统提供的 "DbGlueLoader", 推荐将其改为公共的RPC服务 -->
|
|
|
|
|
<property name="glueLoader" >
|
|
|
|
|
<!-- DbGlueLoader, 依赖 "XXL-JOB公共数据源" -->
|
|
|
|
@ -49,10 +58,10 @@
|
|
|
|
|
|
|
|
|
|
<!-- 配置04、XXL-JOB公共数据源 -->
|
|
|
|
|
<bean id="xxlJobDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
|
|
|
|
|
<property name="driverClass" value="${c3p0.driverClass}" />
|
|
|
|
|
<property name="jdbcUrl" value="${c3p0.url}" />
|
|
|
|
|
<property name="user" value="${c3p0.user}" />
|
|
|
|
|
<property name="password" value="${c3p0.password}" />
|
|
|
|
|
<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" />
|
|
|
|
@ -61,11 +70,6 @@
|
|
|
|
|
<property name="acquireRetryAttempts" value="10" />
|
|
|
|
|
<property name="preferredTestQuery" value="SELECT 1" />
|
|
|
|
|
</bean>
|
|
|
|
|
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
|
|
|
|
<property name="fileEncoding" value="utf-8" />
|
|
|
|
|
<property name="location">
|
|
|
|
|
<value>classpath:jdbc.properties</value>
|
|
|
|
|
</property>
|
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</beans>
|