39 lines
2.0 KiB
XML
39 lines
2.0 KiB
XML
<?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.1.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">
|
||
|
||
<!-- 自动扫描装配 -->
|
||
<context:component-scan base-package="com.sipai.quartz.job"/>
|
||
<!--<context:component-scan base-package="com.sipai"/>-->
|
||
|
||
<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>
|
||
|
||
<!-- 配置02、执行器 -->
|
||
<bean id="xxlJobSpringExecutor" class="com.xxl.job.core.executor.impl.XxlJobSpringExecutor" init-method="start" destroy-method="destroy" >
|
||
<!-- 执行器注册中心地址[选填],为空则关闭自动注册 -->
|
||
<property name="adminAddresses" value="${xxl.job.admin.addresses}" />
|
||
<!-- 执行器AppName[选填],为空则关闭自动注册 -->
|
||
<property name="appName" value="${xxl.job.executor.appname}" />
|
||
<!-- 执行器IP[选填],为空则自动获取 -->
|
||
<property name="ip" value="${xxl.job.executor.ip}" />
|
||
<!-- 执行器端口号[选填],小于等于0则自动获取 -->
|
||
<property name="port" value="${xxl.job.executor.port}" />
|
||
<!-- 访问令牌[选填],非空则进行匹配校验 -->
|
||
<property name="accessToken" value="${xxl.job.accessToken}" />
|
||
<!-- 执行器日志路径[选填],为空则使用默认路径 -->
|
||
<property name="logPath" value="${xxl.job.executor.logpath}" />
|
||
<!-- 日志保存天数[选填],值大于3时生效 -->
|
||
<property name="logRetentionDays" value="${xxl.job.executor.logretentiondays}" />
|
||
</bean>
|
||
|
||
</beans> |