|
36 | 36 |
|
37 | 37 | import org.apache.commons.text.WordUtils;
|
38 | 38 | import org.apache.ibatis.io.Resources;
|
| 39 | +import org.apache.ibatis.logging.Log; |
| 40 | +import org.apache.ibatis.logging.LogFactory; |
39 | 41 | import org.apache.ibatis.reflection.DefaultReflectorFactory;
|
40 | 42 | import org.apache.ibatis.reflection.MetaObject;
|
41 | 43 | import org.apache.ibatis.reflection.factory.DefaultObjectFactory;
|
@@ -71,6 +73,8 @@ public class VelocityLanguageDriverConfig {
|
71 | 73 | TYPE_CONVERTERS = Collections.unmodifiableMap(converters);
|
72 | 74 | }
|
73 | 75 |
|
| 76 | + private static final Log log = LogFactory.getLog(VelocityLanguageDriverConfig.class); |
| 77 | + |
74 | 78 | /**
|
75 | 79 | * The Velocity settings.
|
76 | 80 | */
|
@@ -123,6 +127,8 @@ public String[] getUserdirective() {
|
123 | 127 | */
|
124 | 128 | @Deprecated
|
125 | 129 | public void setUserdirective(String... userDirectives) {
|
| 130 | + log.warn( |
| 131 | + "The 'userdirective' has been deprecated since 2.1.0. Please use the 'velocity-settings.runtime.custom_directives' or 'runtime.custom_directives'."); |
126 | 132 | this.userDirectives = userDirectives;
|
127 | 133 | }
|
128 | 134 |
|
@@ -270,6 +276,9 @@ private static void override(VelocityLanguageDriverConfig config, Properties pro
|
270 | 276 | private static void enableLegacyAdditionalContextAttributes(Properties properties) {
|
271 | 277 | String additionalContextAttributes = properties.getProperty(PROPERTY_KEY_ADDITIONAL_CONTEXT_ATTRIBUTE);
|
272 | 278 | if (Objects.nonNull(additionalContextAttributes)) {
|
| 279 | + log.warn(String.format( |
| 280 | + "The '%s' has been deprecated since 2.1.0. Please use the 'additionalContextAttributes.{name}={value}'.", |
| 281 | + PROPERTY_KEY_ADDITIONAL_CONTEXT_ATTRIBUTE)); |
273 | 282 | Stream.of(additionalContextAttributes.split(",")).forEach(pair -> {
|
274 | 283 | String[] keyValue = pair.split(":");
|
275 | 284 | if (keyValue.length != 2) {
|
|
0 commit comments