Skip to content

mybatis-velocity-2.1.0

Compare
Choose a tag to compare
@kazuki43zoo kazuki43zoo released this 15 Jul 03:58
· 357 commits to master since this release

This version is required Java 8+ and Velocity 2.1. Here is the complete list of changes.

Enhancements

  • Rename Driver to VelocityLanguageDriver #65
  • Add VelocityLanguageDriverConfig like as mybatis-thymeleaf #66
  • Requires to Velocity 2.1 #68
  • Requires Java 8+ #71
  • Add 'additionalContextAttributes.{name}={value}' instead of 'additional.context.attributes' #77
  • The userdirective change to the deprecated property key #78

Dependencies Updates

  • Add Apache Commons Text 1.7 #72 #83
  • Drop Apache Commons Lang #72
  • Upgrade to MyBatis 3.5.2 #81

Miscellaneous

  • Change the version format to x.y.z(semantic versioning) from x.y #70

Migration guide

In this section, we provides migration guide from 2.0.

1. Change to use the VelocityLanguageDriver

In this version, the Driver class rename to VelocityLanguageDriver.

NOTE: Driver is deprecated.

2. Change property key that specify additional context attributes

In this version, new property key format has been supported. Following settings are same mean.

Previous version(2.0):

additional.context.attributes=attribute1:com.example.Attribute1,attribute2:com.example.Attribute2

New version(2.1+):

# additional-context-attributes.{name}={value(FQCN)} format
additional-context-attributes.attribute1=com.example.Attribute1
additional-context-attributes.attribute2=com.example.Attribute2

NOTE: additional.context.attributes is deprecated.

3. Change property key that specify user defined directives

In this version, new property key format has been supported. Following settings are same mean.

Previous version(2.0):

userdirective=com.example.MyDirective,com.example.CustomDirective

New version(2.1+):

velocity-settings.runtime.custom_directives=com.example.MyDirective,com.example.CustomDirective

# or

runtime.custom_directives=com.example.MyDirective,com.example.CustomDirective

NOTE: userdirective is deprecated

4. Change property key that specify a Velocity template engine configuration

In this version, new property key format has been supported. Following settings are same mean.

Previous version(2.0):

# {name}={value} format
resource.default_encoding=Windows-31J

New version(2.1+):

# velocity-settings.{name}={value} format
velocity-settings.resource.default_encoding=Windows-31J

NOTE: Recommend changing to new version format.