tinyid
tinyid copied to clipboard
为啥引入tinyid-client包,应该是本地调用方法,为啥在使用IdGeneratorFactoryClient.createIdGenerator(String bizType)时,还是需要进行http请求?那本地调用的意义何在?)
class IdGeneratorFactoryClient extends AbstractIdGeneratorFactory{ ....省略 @Override protected IdGenerator createIdGenerator(String bizType) { return new CachedIdGenerator(bizType, new HttpSegmentIdServiceImpl()); } ....省略 } 是不是有点问题,需要手动改一下,将HttpSegmentIdServiceImpl改为DbSegmentIdServiceImpl,但改为DbSegmentIdServiceImpl不就引用了tinyId-server工程了吗