xxl-job

applicationcontext-xxl-job.xml 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans
  6. http://www.springframework.org/schema/beans/spring-beans.xsd
  7. http://www.springframework.org/schema/context
  8. http://www.springframework.org/schema/context/spring-context.xsd">
  9. <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  10. <property name="fileEncoding" value="utf-8" />
  11. <property name="locations">
  12. <list>
  13. <value>classpath*:xxl-job-executor.properties</value>
  14. </list>
  15. </property>
  16. </bean>
  17. <!-- ********************************* 基础配置 ********************************* -->
  18. <!-- 配置01、JobHandler 扫描路径 -->
  19. <context:component-scan base-package="com.xxl.job.executor.service.jobhandler" />
  20. <!-- 配置02、执行器 -->
  21. <bean id="xxlJobExecutor" class="com.xxl.job.core.executor.XxlJobExecutor" init-method="start" destroy-method="destroy" >
  22. <!-- 执行器IP[选填],为空则自动获取 -->
  23. <property name="ip" value="${xxl.job.executor.ip}" />
  24. <!-- 执行器端口号[选填],为空则自动获取 -->
  25. <property name="port" value="${xxl.job.executor.port}" />
  26. <!-- 执行器AppName[选填],为空则关闭自动注册 -->
  27. <property name="appName" value="${xxl.job.executor.appname}" />
  28. <!-- 执行器注册中心地址[选填],为空则关闭自动注册 -->
  29. <property name="adminAddresses" value="${xxl.job.admin.addresses}" />
  30. <!-- 执行器日志路径[必填] -->
  31. <property name="logPath" value="${xxl.job.executor.logpath}" />
  32. <!-- 访问令牌,非空则进行匹配校验[选填] -->
  33. <property name="accessToken" value="${xxl.job.accessToken}" />
  34. </bean>
  35. </beans>