The <classPathEntry> Element
The <classPathEntry> element is used to add classpath locations to the classpath of the MyBatis Generator (MBG) run. The <classPathEntry> element is an option child element of the <generatorConfiguration> element. MBG loads classes from these locations in these instances:
- When loading the JDBC driver for database introspection
- When loading root classes in the JavaModelGenerator to check for overridden methods
This element is optional and is not required if you setup the classpath externally to MBG (e.g. with the -cp argument of the java command
Important Note: these locations are NOT used when loading classes that extend one of MBG's classes or implement one of MBG's interfaces. In those cases you must add your external classes to the runtime classpath in the same way you add MBG to the classpath (e.g. with the -cp argument of the java command).