fix:配置类
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
package org.nl.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Component
|
||||||
|
@ConfigurationProperties(prefix = "snowflake")
|
||||||
|
public class SnowflakeProperties {
|
||||||
|
private long workerId; // 对应 snowflake.worker-id
|
||||||
|
private long datacenterId; // 对应 snowflake.datacenter-id
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user