how to set domainObjectName suffix in generateConfig.xml for mybatis generator

413 Views Asked by At

I encountered this situation:

table : t_user,t_manager,...

domainObjectName : UserEntity,ManagerEntity,...

I know how to replace the prefix using the domainObjectRenamingRule,

but how can i append the suffix?

1

There are 1 best solutions below

4
Jeff Butler On BEST ANSWER

You can use a regular expression capture group for this. For example:

<domainObjectRenamingRule searchString="^(?i)t(.*)" replaceString="$1Entity" />