CN108399081B - MyBatis reverse engineering generator - Google Patents
MyBatis reverse engineering generator Download PDFInfo
- Publication number
- CN108399081B CN108399081B CN201810133395.0A CN201810133395A CN108399081B CN 108399081 B CN108399081 B CN 108399081B CN 201810133395 A CN201810133395 A CN 201810133395A CN 108399081 B CN108399081 B CN 108399081B
- Authority
- CN
- China
- Prior art keywords
- plug
- mybatis
- reverse engineering
- database
- type
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000006243 chemical reaction Methods 0.000 claims abstract description 7
- 230000001360 synchronised effect Effects 0.000 claims abstract description 4
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/74—Reverse engineering; Extracting design information from source code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a MyBatis reverse engineering generator which is a self-defined annotation plug-in a support database, and consists of the following plug-ins: the date format plug-in dynamically supports various combined date formats; the currency format plug-in supports a multi-digit decimal currency format; the dynamic character string type plug-in is used for converting any type into a character string; a dynamic Object type plug-in for converting other types into objects; the search plug-in is used for searching any type of data; the Long type conversion plug-in converts Long into String; the cache plug-in is used for temporarily storing data; the distributed lock plug-in controls synchronous access to shared resources among the distributed systems; and the annotation plug-in generates the annotation dynamically. The invention supports configurable, dynamic and plug-in reverse engineering and can support any database annotation plug-in conforming to the standard format.
Description
Technical Field
The invention relates to MyBatis reverse engineering, in particular to a MyBatis reverse engineering generator.
Background
The MyBatis reverse engineering on the market at present cannot be configurable, dynamic and reverse, and cannot support a self-defined annotation plug-in data to perform reverse engineering.
Accordingly, the prior art is deficient and needs improvement.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a MyBatis reverse engineering generator which supports configurable, dynamic and plug-in reverse engineering and can support any database annotation plug-in conforming to a standard format.
The technical scheme of the invention is as follows: a MyBatis reverse engineering generator that supports custom annotation plug-ins in a database, the MyBatis reverse engineering generator consisting of:
the date format plug-in dynamically supports various combined date formats;
the currency format plug-in supports a multi-digit decimal currency format;
the dynamic character string type plug-in is used for converting any type into a character string;
a dynamic Object type plug-in for converting other types into objects;
the search plug-in is used for searching any type of data;
the Long type conversion plug-in converts Long into String;
the cache plug-in is used for temporarily storing data;
the distributed lock plug-in controls synchronous access to shared resources among the distributed systems;
and the annotation plug-in generates the annotation dynamically.
The date format plug-in dynamically supports the date formats of various combinations of yyyy-MM-dd, yyy-MM-ddHH: MM, yyy-MM-ddHH: MM SSS.
The currency format supported by the currency format plug-in comprises int and bigint types.
Wherein the currency format plug-in supports a six digit fractional currency format.
The dynamic character string type plug-in corresponds to @ dynamic S and @ dynamic SS plug-ins in a database.
Wherein the Dynamic Object type plug-in corresponds to @ Dynamic00 and @ Dynamic0 plug-ins in the database.
Wherein the Search plug-in corresponds to an @ Search plug-in a database.
Wherein the Long type conversion plug-in corresponds to @ Long2S (targetField: "idxCode") plug-in the database.
The Cache plug-in corresponds to a Cache (module) plug-in the database.
Wherein the distributed Lock plug-in corresponds to an @ Lock (module ═ msyt-item) plug-in the database.
Compared with the prior art, the invention has the beneficial effects that: the invention supports the annotation plug-in with the self-definition of the database, optimizes the SQL, can dynamically generate reverse codes according to the annotation plug-in with the self-definition of the database, improves the development efficiency and realizes the dynamic reverse engineering of batch, multi-configuration files and various plug-ins.
Drawings
FIG. 1 is a structural composition diagram of a MyBatis reverse engineering generator of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and the specific embodiments.
Referring to fig. 1, the MyBatis reverse engineering generator 1 provided by the present invention supports a customized annotation plug-in a database, and is composed of the following plug-ins:
the date format plug-in 11 dynamically supports date formats of various combinations of yyyy-MM-dd, yyy-MM-ddHH: MM, yyy-MM-ddHH: MM SSS.
The currency format plug-in 12 supports int and bigint types of currency formats, and the currency format supports @ $1, @ $2, @ $3, @ $4, @ $5, @ $6, 1 represents 1 decimal place, 2 represents 2 decimal places, 3 represents 3 decimal places, 4 represents 4 decimal places, 5 represents 5 decimal places, and 6 represents 6 decimal places.
The dynamic character string type plug-in 13 corresponds to the @ dynamic s and @ dynamic ss plug-ins in the database, and can be converted into a character string in any type.
Dynamic Object type plug-in 14, corresponding to the @ Dynamic00 and @ Dynamic0 plug-ins in the database, can convert other types to objects.
The Search plug-in 15 corresponds to an @ Search plug-in the database, and is used for searching any type of data.
The Long type conversion plug-in 16 uses Long conversion to String to solve the problem of precision loss of Long in JS, and corresponds to an @ Long2S (targetField ═ idxCode) plug-in the database.
The Cache plug-in 17 corresponds to a Cache (module) plug-in the database, and is used for temporarily storing data.
The distributed Lock plug-in 18 corresponds to an @ Lock plug-in a database, and controls synchronous access to shared resources among distributed systems.
The annotation plug-in 19 will generate annotations dynamically.
The invention supports the annotation plug-in with the self-definition of the database, optimizes SQL, can dynamically generate reverse codes according to the annotation plug-in with the self-definition of the database, provides development efficiency, and realizes dynamic reverse engineering of batch, multiple configuration files and multiple plug-ins.
In summary, the invention supports configurable, dynamic and plug-in reverse engineering, and can support any database annotation plug-in conforming to the specification format.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A MyBatis reverse engineering generator supporting custom annotation plug-ins in a database, the MyBatis reverse engineering generator comprising:
the date format plug-in dynamically supports various combined date formats;
the currency format plug-in supports a multi-digit decimal currency format; the currency format plug-in supports int and bigint type currency formats, the currency format supports @ $1, @ $2, @ $3, @ $4, @ $5, @ $6, 1 represents 1 decimal place, 2 represents 2 decimal places, 3 represents 3 decimal places, 4 represents 4 decimal places, 5 represents 5 decimal places, and 6 represents 6 decimal places;
the dynamic character string type plug-in is used for converting any type into a character string;
a dynamic Object type plug-in for converting other types into objects;
the search plug-in is used for searching any type of data;
the Long type conversion plug-in converts Long into String;
the cache plug-in is used for temporarily storing data;
the distributed lock plug-in controls synchronous access to shared resources among the distributed systems;
and the annotation plug-in generates the annotation dynamically.
2. The MyBatis reverse engineering generator of claim 1, wherein: the date format plug-in dynamically supports the date formats of yyyy-MM-dd, yyy-MM-ddHH: MM, yyy-MM-ddHH: MM SSS.
3. The MyBatis reverse engineering generator of claim 1, wherein: the currency formats supported by the currency format plug-in include int and bigint types.
4. A MyBatis reverse engineering generator according to claim 3, wherein: the currency format plug-in supports a six digit fractional currency format.
5. The MyBatis reverse engineering generator of claim 1, wherein: the dynamic character string type plug-in corresponds to @ dynamic S and @ dynamic SS plug-ins in a database.
6. The MyBatis reverse engineering generator of claim 1, wherein: the Dynamic Object type plug-ins correspond to @ Dynamic00 and @ Dynamic0 plug-ins in the database.
7. The MyBatis reverse engineering generator of claim 1, wherein: the Search plug-in corresponds to an @ Search plug-in a database.
8. The MyBatis reverse engineering generator of claim 1, wherein: the Long type conversion plug-in corresponds to an @ Long2S (targetField: "idxCode") plug-in the database.
9. The MyBatis reverse engineering generator of claim 1, wherein: the Cache plug-in corresponds to a Cache (module) plug-in the database.
10. The MyBatis reverse engineering generator of claim 1, wherein: the distributed Lock plug-in corresponds to an @ Lock (module ═ msyt-item) plug-in the database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810133395.0A CN108399081B (en) | 2018-02-09 | 2018-02-09 | MyBatis reverse engineering generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810133395.0A CN108399081B (en) | 2018-02-09 | 2018-02-09 | MyBatis reverse engineering generator |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108399081A CN108399081A (en) | 2018-08-14 |
CN108399081B true CN108399081B (en) | 2021-01-26 |
Family
ID=63096012
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810133395.0A Active CN108399081B (en) | 2018-02-09 | 2018-02-09 | MyBatis reverse engineering generator |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108399081B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111079188B (en) * | 2019-12-27 | 2022-04-15 | 苏州海管家物流科技有限公司 | mybatis field encryption and decryption device and encryption and decryption system |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103336760A (en) * | 2013-07-11 | 2013-10-02 | 北京信息科技大学 | Method and device based on reverse engineering for automatically generating software documents |
US8667476B1 (en) * | 2009-01-20 | 2014-03-04 | Adaptmicrosys LLC | Instruction grouping and ungrouping apparatus and method for an adaptive microprocessor system |
US9389934B1 (en) * | 2014-12-18 | 2016-07-12 | Sap Se | Centralized and distributed notification handling system for software applications |
CN105830019A (en) * | 2013-10-18 | 2016-08-03 | 微软技术许可有限责任公司 | Integrated environment for base model generation |
CN105843638A (en) * | 2016-03-18 | 2016-08-10 | 浪潮软件集团有限公司 | A method of upgrading and transforming the framework of the old version of Spring |
CN105893013A (en) * | 2015-12-07 | 2016-08-24 | 乐视云计算有限公司 | Engineering construction system and construction method thereof |
CN107148615A (en) * | 2014-11-27 | 2017-09-08 | 乐金信世股份有限公司 | Computer executable model reverse engineering approach and device |
CN107479883A (en) * | 2017-08-07 | 2017-12-15 | 海闻科技有限公司 | A kind of code generating method and code generator |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9032194B2 (en) * | 2010-12-06 | 2015-05-12 | Microsoft Technology Licensing, Llc | Fast computer startup |
US20120204142A1 (en) * | 2011-02-09 | 2012-08-09 | Schlumberger Technology Corporation | Oilfield application system |
US9141635B2 (en) * | 2012-09-28 | 2015-09-22 | Oracle International Corporation | Transparently upgrading derived database objects |
US9535726B2 (en) * | 2014-09-26 | 2017-01-03 | Oracle International Corporation | Reverse dependency injection in a system with dynamic code loading |
-
2018
- 2018-02-09 CN CN201810133395.0A patent/CN108399081B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8667476B1 (en) * | 2009-01-20 | 2014-03-04 | Adaptmicrosys LLC | Instruction grouping and ungrouping apparatus and method for an adaptive microprocessor system |
CN103336760A (en) * | 2013-07-11 | 2013-10-02 | 北京信息科技大学 | Method and device based on reverse engineering for automatically generating software documents |
CN105830019A (en) * | 2013-10-18 | 2016-08-03 | 微软技术许可有限责任公司 | Integrated environment for base model generation |
CN107148615A (en) * | 2014-11-27 | 2017-09-08 | 乐金信世股份有限公司 | Computer executable model reverse engineering approach and device |
US9389934B1 (en) * | 2014-12-18 | 2016-07-12 | Sap Se | Centralized and distributed notification handling system for software applications |
CN105893013A (en) * | 2015-12-07 | 2016-08-24 | 乐视云计算有限公司 | Engineering construction system and construction method thereof |
CN105843638A (en) * | 2016-03-18 | 2016-08-10 | 浪潮软件集团有限公司 | A method of upgrading and transforming the framework of the old version of Spring |
CN107479883A (en) * | 2017-08-07 | 2017-12-15 | 海闻科技有限公司 | A kind of code generating method and code generator |
Non-Patent Citations (2)
Title |
---|
IntelliJ IDEA下MyBatis逆向工程生成工具的使用;sam199510;《CSDN:https://blog.csdn.net/qq_34197553/article/details/77745773》;20170831;第1-4页 * |
Mybatis逆向工程在JavaEE中的应用;李杉等;《通讯世界》;20171231(第24期);第342页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108399081A (en) | 2018-08-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112199302A (en) | Test data generation method and system, corresponding equipment and storage medium | |
CN109460219B (en) | Method for quickly serializing interface control file | |
CN100550020C (en) | A kind of method and apparatus that is used to solve the Chinese software issue of supporting multilanguage | |
EP3117344B1 (en) | Density-based dynamic geohash | |
CN106777258B (en) | Coding and compressing method for Hbase row key in medical big data storage | |
CN110569243B (en) | Data query method, data query plug-in and data query server | |
CN111625520B (en) | A general method and system for mapping heterogeneous database field types | |
CN104615713A (en) | SQL executing method and device based on multiple database types | |
CN108399081B (en) | MyBatis reverse engineering generator | |
CN101968784A (en) | Digital format conversion method and device | |
CN106095991A (en) | A kind of automatically generate from relevant database to the method for the code of MongoDB database data migration | |
CN103778110A (en) | Method and system for converting simplified Chinese characters into traditional Chinese characters | |
CN101359324A (en) | Data access method of oracle relational database based on procedure call interface | |
CN112905642B (en) | Method for storing IEC61850 report data into relational database based on CSV mapping file | |
CN100377158C (en) | Method for creating library file | |
CN101799890A (en) | Certificate data processing method and system | |
CN111177234A (en) | Device and method for rapidly processing document type data file | |
CN105224319A (en) | The method of XBRL instance document preview is realized based on dom4j | |
CN111881215B (en) | Data synchronization method, device and system | |
CN114185855B (en) | Simplified method and system for generating OFD file based on JSON | |
CN110580330A (en) | File processing method for filling electronic form | |
CN204791068U (en) | System is typeeed to books | |
CN102314406A (en) | The method and system that is used for the lazy data sequenceization of compunication | |
CN106844758A (en) | Data set code generating method | |
CN111290771A (en) | System upgrading method, device, equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 510660 No. 309, Huangpu Avenue, Tianhe District, Guangzhou City, Guangdong Province Applicant after: Guangzhou onion Fashion Group Co.,Ltd. Address before: 510660 No. 309, Huangpu Avenue, Tianhe District, Guangzhou City, Guangdong Province Applicant before: DT GROUP TECHNOLOGY ECOMMERCE Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |