fix: 代码生成器中的WorkerId
parent
f50e65b158
commit
49b8241ad1
|
@ -81,8 +81,9 @@ public class MybatisPlusConfig {
|
|||
*/
|
||||
@Bean
|
||||
public IdentifierGenerator idGenerator() {
|
||||
String hostAddress = NetUtil.getLocalhost().getHostAddress();
|
||||
return new DbIdGenerator((short) ((short) hostAddress.hashCode()%64));
|
||||
// String hostAddress = NetUtil.getLocalhost().getHostAddress();
|
||||
// TODO: 采用配置文件里的
|
||||
return new DbIdGenerator((short) 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue