0

Is there any way to use myBatis generator based on a ddl script instead of a real database?

Joao Moreira
  • 17
  • 1
  • 5

1 Answers1

0

You can't do this out of the box as mybatis generator relies on jdbc to do introspection of the database metadata. But it is rather easy to do it.

The easiest way is to use some in-memory database (H2 may work for you) to do the following:

  1. execute ddl script against the in-memory db
  2. run mybatis generator via java API specifying in-memory db