Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xxl-job
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘晓滨
xxl-job
Commits
6b5879b8
Commit
6b5879b8
authored
Nov 05, 2021
by
陈红帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf(springboot):动态分配端口
parent
074024c2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
XxlJobExecutorApplication.java
.../java/com/xxl/job/executor/XxlJobExecutorApplication.java
+3
-0
application.properties
...mple-springboot/src/main/resources/application.properties
+4
-3
No files found.
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/XxlJobExecutorApplication.java
View file @
6b5879b8
...
@@ -22,6 +22,9 @@ public class XxlJobExecutorApplication {
...
@@ -22,6 +22,9 @@ public class XxlJobExecutorApplication {
* @param args
* @param args
*/
*/
private
static
void
initZookeeperAddres
(
String
[]
args
){
private
static
void
initZookeeperAddres
(
String
[]
args
){
if
(
args
==
null
||
args
.
length
==
0
){
throw
new
RuntimeException
(
"请传入zookeeper的地址"
);
}
String
addres
=
"zookeeper://"
+
args
[
0
];
String
addres
=
"zookeeper://"
+
args
[
0
];
Properties
properties
=
new
Properties
();
Properties
properties
=
new
Properties
();
properties
.
setProperty
(
"dubbo.registry.address"
,
addres
);
properties
.
setProperty
(
"dubbo.registry.address"
,
addres
);
...
...
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/resources/application.properties
View file @
6b5879b8
# web port
# web port
等于0时自动获取
server.port
=
8081
server.port
=
0
# log config
# log config
logging.config
=
classpath:logback.xml
logging.config
=
classpath:logback.xml
...
@@ -11,7 +11,8 @@ xxl.job.admin.addresses=http://127.0.0.1:8181/xxl-job-admin
...
@@ -11,7 +11,8 @@ xxl.job.admin.addresses=http://127.0.0.1:8181/xxl-job-admin
### xxl-job executor address
### xxl-job executor address
xxl.job.executor.appname
=
com-spacetech-service-xxl-job-springboot
xxl.job.executor.appname
=
com-spacetech-service-xxl-job-springboot
xxl.job.executor.ip
=
xxl.job.executor.ip
=
xxl.job.executor.port
=
9999
### 执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口;
xxl.job.executor.port
=
0
### xxl-job, access token
### xxl-job, access token
xxl.job.accessToken
=
xxl.job.accessToken
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment