我修改了一版,需要的可以直接安装。主要修改是增加了id长度限制和按日期循环生成id。
作者: bytechaocai创建于 2025年3月15日更新于 2025年3月15日
- Simplify the core module, move unit tests to the server.
- Add spring-boot-starter (not uploaded to the central repository, need to install and import it yourself).
- Modify the packaging script, package it to the
deploydirectory, and generate the startup scriptstart-server.sh. - No longer limit the table name and field name of the segment table, let the user implement the
IDAllocDaointerface, which can be a mybatis mapping or a service component@Serviceor@Component. - Add a function to limit the length of the id, by setting the
max_numberto limit the length of the id, for example, 999999 represents the maximum length is 6. - Add a function to reset the id when the date changes.
- Add a utility class
LeafSegmentGeneratorwith static methods.
内容来源: Meituan-Dianping/Leaf