Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
X
XXL-JOB
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
靳帅
XXL-JOB
Commits
f08cd6a6
提交
f08cd6a6
authored
3月 10, 2017
作者:
xueli.xue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
规范执行器配置信息,通过配置文件统一管理
上级
a5757be4
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
41 行增加
和
38 行删除
+41
-38
applicationcontext-base.xml
...min/src/main/resources/spring/applicationcontext-base.xml
+0
-0
applicationcontext-xxl-job-admin.xml
...ain/resources/spring/applicationcontext-xxl-job-admin.xml
+6
-4
springmvc-context.xml
...job-admin/src/main/resources/spring/springmvc-context.xml
+0
-0
web.xml
xxl-job-admin/src/main/webapp/WEB-INF/web.xml
+2
-2
applicationcontext-xxl-job.xml
...example/src/main/resources/applicationcontext-xxl-job.xml
+19
-14
jdbc.properties
xxl-job-executor-example/src/main/resources/jdbc.properties
+0
-5
xxl-job-executor.properties
...or-example/src/main/resources/xxl-job-executor.properties
+14
-0
web.xml
xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+0
-13
没有找到文件。
xxl-job-admin/src/main/resources/applicationcontext-base.xml
→
xxl-job-admin/src/main/resources/
spring/
applicationcontext-base.xml
浏览文件 @
f08cd6a6
xxl-job-admin/src/main/resources/applicationcontext-xxl-job-admin.xml
→
xxl-job-admin/src/main/resources/
spring/
applicationcontext-xxl-job-admin.xml
浏览文件 @
f08cd6a6
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
</property>
</property>
</bean>
</bean>
<!-- part 1 :for datasource -->
<!-- ********************************* part 1 :for datasource ********************************* -->
<bean
id=
"dataSource"
class=
"com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method=
"close"
>
<bean
id=
"dataSource"
class=
"com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method=
"close"
>
<property
name=
"driverClass"
value=
"${xxl.job.db.driverClass}"
/>
<property
name=
"driverClass"
value=
"${xxl.job.db.driverClass}"
/>
<property
name=
"jdbcUrl"
value=
"${xxl.job.db.url}"
/>
<property
name=
"jdbcUrl"
value=
"${xxl.job.db.url}"
/>
...
@@ -44,7 +45,8 @@
...
@@ -44,7 +45,8 @@
<constructor-arg
index=
"0"
ref=
"sqlSessionFactory"
/>
<constructor-arg
index=
"0"
ref=
"sqlSessionFactory"
/>
</bean>
</bean>
<!-- part 2 :for tx -->
<!-- ********************************* part 2 :for tx ********************************* -->
<bean
id=
"transactionManager"
class=
"org.springframework.jdbc.datasource.DataSourceTransactionManager"
>
<bean
id=
"transactionManager"
class=
"org.springframework.jdbc.datasource.DataSourceTransactionManager"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"dataSource"
ref=
"dataSource"
/>
</bean>
</bean>
...
@@ -68,7 +70,8 @@
...
@@ -68,7 +70,8 @@
<aop:advisor
pointcut-ref=
"txoperation"
advice-ref=
"txAdvice"
/>
<aop:advisor
pointcut-ref=
"txoperation"
advice-ref=
"txAdvice"
/>
</aop:config>
</aop:config>
<!-- part 3 :for quartz -->
<!-- ********************************* part 3 :for xxl-job scheduler ********************************* -->
<bean
id=
"quartzScheduler"
lazy-init=
"false"
class=
"org.springframework.scheduling.quartz.SchedulerFactoryBean"
>
<bean
id=
"quartzScheduler"
lazy-init=
"false"
class=
"org.springframework.scheduling.quartz.SchedulerFactoryBean"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"autoStartup"
value=
"true"
/>
<!--自动启动 -->
<property
name=
"autoStartup"
value=
"true"
/>
<!--自动启动 -->
...
@@ -77,7 +80,6 @@
...
@@ -77,7 +80,6 @@
<property
name=
"configLocation"
value=
"classpath:quartz.properties"
/>
<property
name=
"configLocation"
value=
"classpath:quartz.properties"
/>
</bean>
</bean>
<!-- 协同-调度器 -->
<bean
id=
"xxlJobDynamicScheduler"
class=
"com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler"
init-method=
"init"
destroy-method=
"destroy"
>
<bean
id=
"xxlJobDynamicScheduler"
class=
"com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler"
init-method=
"init"
destroy-method=
"destroy"
>
<!-- (轻易不要变更“调度器名称”, 任务创建时会绑定该“调度器名称”) -->
<!-- (轻易不要变更“调度器名称”, 任务创建时会绑定该“调度器名称”) -->
<property
name=
"scheduler"
ref=
"quartzScheduler"
/>
<property
name=
"scheduler"
ref=
"quartzScheduler"
/>
...
...
xxl-job-admin/src/main/resources/springmvc-context.xml
→
xxl-job-admin/src/main/resources/spring
/spring
mvc-context.xml
浏览文件 @
f08cd6a6
xxl-job-admin/src/main/webapp/WEB-INF/web.xml
浏览文件 @
f08cd6a6
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<context-param>
<context-param>
<param-name>
contextConfigLocation
</param-name>
<param-name>
contextConfigLocation
</param-name>
<param-value>
classpath*:applicationcontext-*.xml
</param-value>
<param-value>
classpath*:
spring/
applicationcontext-*.xml
</param-value>
</context-param>
</context-param>
<listener>
<listener>
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<init-param>
<param-name>
contextConfigLocation
</param-name>
<param-name>
contextConfigLocation
</param-name>
<param-value>
classpath*:springmvc-context.xml
</param-value>
<param-value>
classpath*:spring
/spring
mvc-context.xml
</param-value>
</init-param>
</init-param>
<load-on-startup>
1
</load-on-startup>
<load-on-startup>
1
</load-on-startup>
</servlet>
</servlet>
...
...
xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
浏览文件 @
f08cd6a6
...
@@ -7,6 +7,15 @@
...
@@ -7,6 +7,15 @@
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
>
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 扫描路径 -->
<!-- 配置01、JobHandler 扫描路径 -->
...
@@ -15,10 +24,10 @@
...
@@ -15,10 +24,10 @@
<!-- 配置02、执行器 -->
<!-- 配置02、执行器 -->
<bean
id=
"xxlJobExecutor"
class=
"com.xxl.job.core.executor.XxlJobExecutor"
init-method=
"start"
destroy-method=
"destroy"
>
<bean
id=
"xxlJobExecutor"
class=
"com.xxl.job.core.executor.XxlJobExecutor"
init-method=
"start"
destroy-method=
"destroy"
>
<!-- 执行器IP[选填],为空则自动获取 -->
<!-- 执行器IP[选填],为空则自动获取 -->
<
!--<property name="ip" value="" />--
>
<
property
name=
"ip"
value=
"${xxl.job.executor.ip}"
/
>
<!-- 执行器端口号 -->
<!-- 执行器端口号 -->
<property
name=
"port"
value=
"
9999
"
/>
<property
name=
"port"
value=
"
${xxl.job.executor.port}
"
/>
<property
name=
"appName"
value=
"
xxl-job-executor-example
"
/>
<property
name=
"appName"
value=
"
${xxl.job.executor.appname}
"
/>
<!-- 执行器注册器,默认使用系统提供的 "DbRegistHelper", 推荐将其改为公共的RPC服务 -->
<!-- 执行器注册器,默认使用系统提供的 "DbRegistHelper", 推荐将其改为公共的RPC服务 -->
<property
name=
"registHelper"
>
<property
name=
"registHelper"
>
<!-- DbRegistHelper, 依赖 "XXL-JOB公共数据源" -->
<!-- DbRegistHelper, 依赖 "XXL-JOB公共数据源" -->
...
@@ -34,7 +43,7 @@
...
@@ -34,7 +43,7 @@
<!-- 配置03、GlueFactory -->
<!-- 配置03、GlueFactory -->
<bean
id=
"glueFactory"
class=
"com.xxl.job.core.glue.GlueFactory"
>
<bean
id=
"glueFactory"
class=
"com.xxl.job.core.glue.GlueFactory"
>
<!-- GLUE任务示例缓存失效时间, 单位/ms -->
<!-- GLUE任务示例缓存失效时间, 单位/ms -->
<property
name=
"cacheTimeout"
value=
"
10000
"
/>
<property
name=
"cacheTimeout"
value=
"
${xxl.job.glue.cache.time}
"
/>
<!-- GLUE源码加载器,默认使用系统提供的 "DbGlueLoader", 推荐将其改为公共的RPC服务 -->
<!-- GLUE源码加载器,默认使用系统提供的 "DbGlueLoader", 推荐将其改为公共的RPC服务 -->
<property
name=
"glueLoader"
>
<property
name=
"glueLoader"
>
<!-- DbGlueLoader, 依赖 "XXL-JOB公共数据源" -->
<!-- DbGlueLoader, 依赖 "XXL-JOB公共数据源" -->
...
@@ -49,10 +58,10 @@
...
@@ -49,10 +58,10 @@
<!-- 配置04、XXL-JOB公共数据源 -->
<!-- 配置04、XXL-JOB公共数据源 -->
<bean
id=
"xxlJobDataSource"
class=
"com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method=
"close"
>
<bean
id=
"xxlJobDataSource"
class=
"com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method=
"close"
>
<property
name=
"driverClass"
value=
"${
c3p0
.driverClass}"
/>
<property
name=
"driverClass"
value=
"${
xxl.job.db
.driverClass}"
/>
<property
name=
"jdbcUrl"
value=
"${
c3p0
.url}"
/>
<property
name=
"jdbcUrl"
value=
"${
xxl.job.db
.url}"
/>
<property
name=
"user"
value=
"${
c3p0
.user}"
/>
<property
name=
"user"
value=
"${
xxl.job.db
.user}"
/>
<property
name=
"password"
value=
"${
c3p0
.password}"
/>
<property
name=
"password"
value=
"${
xxl.job.db
.password}"
/>
<property
name=
"initialPoolSize"
value=
"3"
/>
<property
name=
"initialPoolSize"
value=
"3"
/>
<property
name=
"minPoolSize"
value=
"2"
/>
<property
name=
"minPoolSize"
value=
"2"
/>
<property
name=
"maxPoolSize"
value=
"10"
/>
<property
name=
"maxPoolSize"
value=
"10"
/>
...
@@ -61,11 +70,6 @@
...
@@ -61,11 +70,6 @@
<property
name=
"acquireRetryAttempts"
value=
"10"
/>
<property
name=
"acquireRetryAttempts"
value=
"10"
/>
<property
name=
"preferredTestQuery"
value=
"SELECT 1"
/>
<property
name=
"preferredTestQuery"
value=
"SELECT 1"
/>
</bean>
</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>
</beans>
\ No newline at end of file
xxl-job-executor-example/src/main/resources/jdbc.properties
deleted
100644 → 0
浏览文件 @
a5757be4
c3p0.driverClass
=
com.mysql.jdbc.Driver
c3p0.url
=
jdbc:mysql://localhost:3306/xxl-job?useUnicode=true&characterEncoding=UTF-8
c3p0.user
=
root
c3p0.password
=
root_pwd
\ No newline at end of file
xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
0 → 100644
浏览文件 @
f08cd6a6
### xxl-job db
xxl.job.db.driverClass
=
com.mysql.jdbc.Driver
xxl.job.db.url
=
jdbc:mysql://localhost:3306/xxl-job?useUnicode=true&characterEncoding=UTF-8
xxl.job.db.user
=
root
xxl.job.db.password
=
root_pwd
### xxl-job glue cache time/ms
xxl.job.glue.cache.time
=
10000
### xxl-job executor address
xxl.job.executor.appname
=
xxl-job-executor-example
xxl.job.executor.ip
=
xxl.job.executor.port
=
9999
\ No newline at end of file
xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
浏览文件 @
f08cd6a6
...
@@ -20,19 +20,6 @@
...
@@ -20,19 +20,6 @@
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
</listener>
<!-- [@Deprecated] Servlet任务执行器,推荐使用Jetty任务执行器 -->
<!--
<servlet>
<servlet-name>XxlJobServlet</servlet-name>
<servlet-class>com.xxl.job.client.netcom.servlet.XxlJobServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>XxlJobServlet</servlet-name>
<url-pattern>/xxlJobServlet</url-pattern>
</servlet-mapping>
-->
<welcome-file-list>
<welcome-file-list>
<welcome-file>
index.html
</welcome-file>
<welcome-file>
index.html
</welcome-file>
</welcome-file-list>
</welcome-file-list>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论