Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 311488ce
authored
Apr 21, 2021
by
fz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.snowflake配置信息打印
1 parent
f98310fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/main/java/com/glsx/smart/config/SnowWorkerConfig.java
src/main/java/com/glsx/smart/config/SnowWorkerConfig.java
View file @
311488c
...
@@ -22,7 +22,10 @@ public class SnowWorkerConfig {
...
@@ -22,7 +22,10 @@ public class SnowWorkerConfig {
@Bean
(
"snowflakeWorker"
)
@Bean
(
"snowflakeWorker"
)
public
SnowflakeWorker
getSnowFlakeWorker
()
{
public
SnowflakeWorker
getSnowFlakeWorker
()
{
SnowflakeWorker
worker
=
new
SnowflakeWorker
(
Long
.
valueOf
(
snowFlakeConfig
.
getWorkerId
()),
Long
.
valueOf
(
snowFlakeConfig
.
getDatacenterId
()));
String
workerId
=
snowFlakeConfig
.
getWorkerId
();
String
datacenterId
=
snowFlakeConfig
.
getDatacenterId
();
log
.
info
(
"SnowWorkerConfig====workerId:"
+
workerId
+
"====datacenterId:"
+
datacenterId
);
SnowflakeWorker
worker
=
new
SnowflakeWorker
(
Long
.
valueOf
(
workerId
),
Long
.
valueOf
(
datacenterId
));
return
worker
;
return
worker
;
}
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment