Solve the problem that multiple databases have the same table name in the automatic code generation of the generator persistence layer

Solve the problem that multiple databases have the same table name in the automatic code generation of the generator persistence layer

Problem: In actual operation, it is found that the database link and library name where the table to be generated has been configured in generator.xml, but in the process of generating code, debug found that the loaded database is not the set database, but Another library
solution with the same table name: 1. Add property tag in generator.xml
insert image description here2. Configure directly in jdbc.properties, and splice this parameter
connectionURL="jdbc:mysql://127.0 directly after url .0.0/db_01?nullCatalogMeansCurrent=true”

Solution 2 is not verified, I use solution 1 and it works.

Guess you like

Origin blog.csdn.net/weixin_48363639/article/details/124147278