Method for inserting data into fragments in batches based on MybatisPlus
The invention relates to the technical field of data insertion, in particular to a fragmentation batch data insertion method based on MybatisPlus, which comprises the following steps: building a demo framework containing Spring Boot, MybatisPlus and Mysql, creating an entity class Student, adding lo...
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention relates to the technical field of data insertion, in particular to a fragmentation batch data insertion method based on MybatisPlus, which comprises the following steps: building a demo framework containing Spring Boot, MybatisPlus and Mysql, creating an entity class Student, adding lombbox dependency, creating a DefaultSqlInjector self-defined sql injector inheriting MybatisPlus, injecting the self-defined sql injector into a MybatisPlus container, creating a MyMapper inheriting BaseMapper, the BaseMapper is an interface class in the MybatisPlus, adding an invtBatchSomeColumn, and inheriting the self-defined MyMapper by a mapper layer interface of the Student, so that the According to the method and the system, the service layer of the Student realizes class custom batch insertion, rewriteBatchedStates = true is added on the url path of the jdbc, the data list of batch insertion and the number of each batch are introduced into the service layer to complete batch insertion so as to realize batch |
---|