fix: 代码生成器中的WorkerId

V0.5.x
jay 2023-06-25 11:45:07 +08:00
parent f50e65b158
commit 49b8241ad1
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}
/**