xueli.xue 8 jaren geleden
bovenliggende
commit
9eacd0cadb
1 gewijzigde bestanden met toevoegingen van 10 en 3 verwijderingen
  1. 10 3
      xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml

+ 10 - 3
xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml Bestand weergeven

7
            http://www.springframework.org/schema/context
7
            http://www.springframework.org/schema/context
8
            http://www.springframework.org/schema/context/spring-context-3.0.xsd">
8
            http://www.springframework.org/schema/context/spring-context-3.0.xsd">
9
 
9
 
10
+    <!-- ********************************* 基础配置 ********************************* -->
11
+
10
 	<!-- 配置01、JobHandler 扫描路径 -->
12
 	<!-- 配置01、JobHandler 扫描路径 -->
11
 	<context:component-scan base-package="com.xxl.job.executor.service.jobhandler" />
13
 	<context:component-scan base-package="com.xxl.job.executor.service.jobhandler" />
12
 
14
 
16
 		<property name="port" value="9999" />
18
 		<property name="port" value="9999" />
17
 	</bean>
19
 	</bean>
18
 
20
 
19
-	<!-- 配置03、GlueFactory (启用GLUE任务时才需要, 否则可删除) -->
21
+    <!-- ********************************* "GlueFactory" 配置, 仅在启动 "GLUE模式任务" 时才需要, 否则可删除 ********************************* -->
22
+
23
+	<!-- 配置03、GlueFactory -->
20
 	<bean id="glueFactory" class="com.xxl.job.core.glue.GlueFactory">
24
 	<bean id="glueFactory" class="com.xxl.job.core.glue.GlueFactory">
21
 		<!-- GLUE任务示例缓存失效时间, 单位/ms -->
25
 		<!-- GLUE任务示例缓存失效时间, 单位/ms -->
22
 		<property name="cacheTimeout" value="10000" />
26
 		<property name="cacheTimeout" value="10000" />
23
-		<!-- GLUE 代码加载器,推荐将该服务配置成RPC服务 -->
27
+		<!-- GLUE源码加载器,默认使用系统提供的 "DbGlueLoader", 推荐将其改为公共的RPC服务 -->
24
 		<property name="glueLoader" >
28
 		<property name="glueLoader" >
29
+            <!-- DbGlueLoader, 依赖 "XXL-JOB公共数据源" -->
25
 			<bean class="com.xxl.job.core.glue.loader.impl.DbGlueLoader" >
30
 			<bean class="com.xxl.job.core.glue.loader.impl.DbGlueLoader" >
26
 				<!-- XXL-JOB公共数据源 -->
31
 				<!-- XXL-JOB公共数据源 -->
27
 				<property name="dataSource" ref="dataSource" />
32
 				<property name="dataSource" ref="dataSource" />
29
 		</property>
34
 		</property>
30
 	</bean>
35
 	</bean>
31
 
36
 
32
-	<!-- 配置04、XXL-JOB公共数据源 (启用GLUE任务, 且使用 "DbGlueLoader" 作为 "GLUE源码加载器" 时才需要, 否则可删除) -->
37
+    <!-- ********************************* "XXL-JOB公共数据源" 配置, 仅在启动 "GLUE模式任务" 的 "DbGlueLoader" 时才需要, 否则可删除 ********************************* -->
38
+
39
+	<!-- 配置04、XXL-JOB公共数据源 -->
33
 	<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"  destroy-method="close">
40
 	<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"  destroy-method="close">
34
 		<property name="driverClass" value="${c3p0.driverClass}" />
41
 		<property name="driverClass" value="${c3p0.driverClass}" />
35
 		<property name="jdbcUrl" value="${c3p0.url}" />
42
 		<property name="jdbcUrl" value="${c3p0.url}" />