Annotation-based auto-generate and auto-fill distributed id module Supported Persistence Layer Frameworks Currently Mybatis - Interceptor-based How to Use Just put @IdFill on the field. And also you can config it in application.yml.