View Javadoc
1   /*
2    *    Copyright 2015-2023 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       https://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
15   */
16  package org.mybatis.spring.boot.autoconfigure;
17  
18  import java.io.IOException;
19  import java.util.Optional;
20  import java.util.Properties;
21  import java.util.Set;
22  import java.util.stream.Stream;
23  
24  import org.apache.ibatis.io.VFS;
25  import org.apache.ibatis.logging.Log;
26  import org.apache.ibatis.mapping.ResultSetType;
27  import org.apache.ibatis.scripting.LanguageDriver;
28  import org.apache.ibatis.session.AutoMappingBehavior;
29  import org.apache.ibatis.session.AutoMappingUnknownColumnBehavior;
30  import org.apache.ibatis.session.Configuration;
31  import org.apache.ibatis.session.ExecutorType;
32  import org.apache.ibatis.session.LocalCacheScope;
33  import org.apache.ibatis.type.JdbcType;
34  import org.apache.ibatis.type.TypeHandler;
35  import org.springframework.boot.context.properties.ConfigurationProperties;
36  import org.springframework.boot.context.properties.PropertyMapper;
37  import org.springframework.core.io.Resource;
38  import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
39  import org.springframework.core.io.support.ResourcePatternResolver;
40  
41  /**
42   * Configuration properties for MyBatis.
43   *
44   * @author EddĂș MelĂ©ndez
45   * @author Kazuki Shimizu
46   */
47  @ConfigurationProperties(prefix = MybatisProperties.MYBATIS_PREFIX)
48  public class MybatisProperties {
49  
50    public static final String MYBATIS_PREFIX = "mybatis";
51  
52    private static final ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
53  
54    /**
55     * Location of MyBatis xml config file.
56     */
57    private String configLocation;
58  
59    /**
60     * Locations of MyBatis mapper files.
61     */
62    private String[] mapperLocations;
63  
64    /**
65     * Packages to search type aliases. (Package delimiters are ",; \t\n")
66     */
67    private String typeAliasesPackage;
68  
69    /**
70     * The super class for filtering type alias. If this not specifies, the MyBatis deal as type alias all classes that
71     * searched from typeAliasesPackage.
72     */
73    private Class<?> typeAliasesSuperType;
74  
75    /**
76     * Packages to search for type handlers. (Package delimiters are ",; \t\n")
77     */
78    private String typeHandlersPackage;
79  
80    /**
81     * Indicates whether perform presence check of the MyBatis xml config file.
82     */
83    private boolean checkConfigLocation = false;
84  
85    /**
86     * Execution mode for {@link org.mybatis.spring.SqlSessionTemplate}.
87     */
88    private ExecutorType executorType;
89  
90    /**
91     * The default scripting language driver class. (Available when use together with mybatis-spring 2.0.2+)
92     */
93    private Class<? extends LanguageDriver> defaultScriptingLanguageDriver;
94  
95    /**
96     * Externalized properties for MyBatis configuration.
97     */
98    private Properties configurationProperties;
99  
100   /**
101    * A Configuration object for customize default settings. If {@link #configLocation} is specified, this property is
102    * not used.
103    */
104   private CoreConfiguration configuration;
105 
106   /**
107    * @since 1.1.0
108    */
109   public String getConfigLocation() {
110     return this.configLocation;
111   }
112 
113   /**
114    * @since 1.1.0
115    */
116   public void setConfigLocation(String configLocation) {
117     this.configLocation = configLocation;
118   }
119 
120   public String[] getMapperLocations() {
121     return this.mapperLocations;
122   }
123 
124   public void setMapperLocations(String[] mapperLocations) {
125     this.mapperLocations = mapperLocations;
126   }
127 
128   public String getTypeHandlersPackage() {
129     return this.typeHandlersPackage;
130   }
131 
132   public void setTypeHandlersPackage(String typeHandlersPackage) {
133     this.typeHandlersPackage = typeHandlersPackage;
134   }
135 
136   public String getTypeAliasesPackage() {
137     return this.typeAliasesPackage;
138   }
139 
140   public void setTypeAliasesPackage(String typeAliasesPackage) {
141     this.typeAliasesPackage = typeAliasesPackage;
142   }
143 
144   /**
145    * @since 1.3.3
146    */
147   public Class<?> getTypeAliasesSuperType() {
148     return typeAliasesSuperType;
149   }
150 
151   /**
152    * @since 1.3.3
153    */
154   public void setTypeAliasesSuperType(Class<?> typeAliasesSuperType) {
155     this.typeAliasesSuperType = typeAliasesSuperType;
156   }
157 
158   public boolean isCheckConfigLocation() {
159     return this.checkConfigLocation;
160   }
161 
162   public void setCheckConfigLocation(boolean checkConfigLocation) {
163     this.checkConfigLocation = checkConfigLocation;
164   }
165 
166   public ExecutorType getExecutorType() {
167     return this.executorType;
168   }
169 
170   public void setExecutorType(ExecutorType executorType) {
171     this.executorType = executorType;
172   }
173 
174   /**
175    * @since 2.1.0
176    */
177   public Class<? extends LanguageDriver> getDefaultScriptingLanguageDriver() {
178     return defaultScriptingLanguageDriver;
179   }
180 
181   /**
182    * @since 2.1.0
183    */
184   public void setDefaultScriptingLanguageDriver(Class<? extends LanguageDriver> defaultScriptingLanguageDriver) {
185     this.defaultScriptingLanguageDriver = defaultScriptingLanguageDriver;
186   }
187 
188   /**
189    * @since 1.2.0
190    */
191   public Properties getConfigurationProperties() {
192     return configurationProperties;
193   }
194 
195   /**
196    * @since 1.2.0
197    */
198   public void setConfigurationProperties(Properties configurationProperties) {
199     this.configurationProperties = configurationProperties;
200   }
201 
202   public CoreConfiguration getConfiguration() {
203     return configuration;
204   }
205 
206   public void setConfiguration(CoreConfiguration configuration) {
207     this.configuration = configuration;
208   }
209 
210   public Resource[] resolveMapperLocations() {
211     return Stream.of(Optional.ofNullable(this.mapperLocations).orElse(new String[0]))
212         .flatMap(location -> Stream.of(getResources(location))).toArray(Resource[]::new);
213   }
214 
215   private Resource[] getResources(String location) {
216     try {
217       return resourceResolver.getResources(location);
218     } catch (IOException e) {
219       return new Resource[0];
220     }
221   }
222 
223   /**
224    * The configuration properties for mybatis core module.
225    *
226    * @since 3.0.0
227    */
228   public static class CoreConfiguration {
229 
230     /**
231      * Allows using RowBounds on nested statements. If allow, set the false. Default is false.
232      */
233     private Boolean safeRowBoundsEnabled;
234 
235     /**
236      * Allows using ResultHandler on nested statements. If allow, set the false. Default is true.
237      */
238     private Boolean safeResultHandlerEnabled;
239 
240     /**
241      * Enables automatic mapping from classic database column names A_COLUMN to camel case classic Java property names
242      * aColumn. Default is false.
243      */
244     private Boolean mapUnderscoreToCamelCase;
245 
246     /**
247      * When enabled, any method call will load all the lazy properties of the object. Otherwise, each property is loaded
248      * on demand (see also lazyLoadTriggerMethods). Default is false.
249      */
250     private Boolean aggressiveLazyLoading;
251 
252     /**
253      * Allows or disallows multiple ResultSets to be returned from a single statement (compatible driver required).
254      * Default is true.
255      */
256     private Boolean multipleResultSetsEnabled;
257 
258     /**
259      * Allows JDBC support for generated keys. A compatible driver is required. This setting forces generated keys to be
260      * used if set to true, as some drivers deny compatibility but still work (e.g. Derby). Default is false.
261      */
262     private Boolean useGeneratedKeys;
263 
264     /**
265      * Uses the column label instead of the column name. Different drivers behave differently in this respect. Refer to
266      * the driver documentation, or test out both modes to determine how your driver behaves. Default is true.
267      */
268     private Boolean useColumnLabel;
269 
270     /**
271      * Globally enables or disables any caches configured in any mapper under this configuration. Default is true.
272      */
273     private Boolean cacheEnabled;
274 
275     /**
276      * Specifies if setters or map's put method will be called when a retrieved value is null. It is useful when you
277      * rely on Map.keySet() or null value initialization. Note primitives such as (int,boolean,etc.) will not be set to
278      * null. Default is false.
279      */
280     private Boolean callSettersOnNulls;
281 
282     /**
283      * Allow referencing statement parameters by their actual names declared in the method signature. To use this
284      * feature, your project must be compiled in Java 8 with -parameters option. Default is true.
285      */
286     private Boolean useActualParamName;
287 
288     /**
289      * MyBatis, by default, returns null when all the columns of a returned row are NULL. When this setting is enabled,
290      * MyBatis returns an empty instance instead. Note that it is also applied to nested results (i.e. collectioin and
291      * association). Default is false.
292      */
293     private Boolean returnInstanceForEmptyRow;
294 
295     /**
296      * Removes extra whitespace characters from the SQL. Note that this also affects literal strings in SQL. Default is
297      * false.
298      */
299     private Boolean shrinkWhitespacesInSql;
300 
301     /**
302      * Specifies the default value of 'nullable' attribute on 'foreach' tag. Default is false.
303      */
304     private Boolean nullableOnForEach;
305 
306     /**
307      * When applying constructor auto-mapping, argument name is used to search the column to map instead of relying on
308      * the column order. Default is false.
309      */
310     private Boolean argNameBasedConstructorAutoMapping;
311 
312     /**
313      * Globally enables or disables lazy loading. When enabled, all relations will be lazily loaded. This value can be
314      * superseded for a specific relation by using the fetchType attribute on it. Default is False.
315      */
316     private Boolean lazyLoadingEnabled;
317 
318     /**
319      * Sets the number of seconds the driver will wait for a response from the database.
320      */
321     private Integer defaultStatementTimeout;
322 
323     /**
324      * Sets the driver a hint as to control fetching size for return results. This parameter value can be override by a
325      * query setting.
326      */
327     private Integer defaultFetchSize;
328 
329     /**
330      * MyBatis uses local cache to prevent circular references and speed up repeated nested queries. By default
331      * (SESSION) all queries executed during a session are cached. If localCacheScope=STATEMENT local session will be
332      * used just for statement execution, no data will be shared between two different calls to the same SqlSession.
333      * Default is SESSION.
334      */
335     private LocalCacheScope localCacheScope;
336 
337     /**
338      * Specifies the JDBC type for null values when no specific JDBC type was provided for the parameter. Some drivers
339      * require specifying the column JDBC type but others work with generic values like NULL, VARCHAR or OTHER. Default
340      * is OTHER.
341      */
342     private JdbcType jdbcTypeForNull;
343 
344     /**
345      * Specifies a scroll strategy when omit it per statement settings.
346      */
347     private ResultSetType defaultResultSetType;
348 
349     /**
350      * Configures the default executor. SIMPLE executor does nothing special. REUSE executor reuses prepared statements.
351      * BATCH executor reuses statements and batches updates. Default is SIMPLE.
352      */
353     private ExecutorType defaultExecutorType;
354 
355     /**
356      * Specifies if and how MyBatis should automatically map columns to fields/properties. NONE disables auto-mapping.
357      * PARTIAL will only auto-map results with no nested result mappings defined inside. FULL will auto-map result
358      * mappings of any complexity (containing nested or otherwise). Default is PARTIAL.
359      */
360     private AutoMappingBehavior autoMappingBehavior;
361 
362     /**
363      * Specify the behavior when detects an unknown column (or unknown property type) of automatic mapping target.
364      * Default is NONE.
365      */
366     private AutoMappingUnknownColumnBehavior autoMappingUnknownColumnBehavior;
367 
368     /**
369      * Specifies the prefix string that MyBatis will add to the logger names.
370      */
371     private String logPrefix;
372 
373     /**
374      * Specifies which Object's methods trigger a lazy load. Default is [equals,clone,hashCode,toString].
375      */
376     private Set<String> lazyLoadTriggerMethods;
377 
378     /**
379      * Specifies which logging implementation MyBatis should use. If this setting is not present logging implementation
380      * will be autodiscovered.
381      */
382     private Class<? extends Log> logImpl;
383 
384     /**
385      * Specifies VFS implementations.
386      */
387     private Class<? extends VFS> vfsImpl;
388 
389     /**
390      * Specifies an sql provider class that holds provider method. This class apply to the type(or value) attribute on
391      * sql provider annotation(e.g. @SelectProvider), when these attribute was omitted.
392      */
393     private Class<?> defaultSqlProviderType;
394 
395     /**
396      * Specifies the TypeHandler used by default for Enum.
397      */
398     Class<? extends TypeHandler> defaultEnumTypeHandler;
399 
400     /**
401      * Specifies the class that provides an instance of Configuration. The returned Configuration instance is used to
402      * load lazy properties of deserialized objects. This class must have a method with a signature static Configuration
403      * getConfiguration().
404      */
405     private Class<?> configurationFactory;
406 
407     /**
408      * Specify any configuration variables.
409      */
410     private Properties variables;
411 
412     public Boolean getSafeRowBoundsEnabled() {
413       return safeRowBoundsEnabled;
414     }
415 
416     public void setSafeRowBoundsEnabled(Boolean safeRowBoundsEnabled) {
417       this.safeRowBoundsEnabled = safeRowBoundsEnabled;
418     }
419 
420     public Boolean getSafeResultHandlerEnabled() {
421       return safeResultHandlerEnabled;
422     }
423 
424     public void setSafeResultHandlerEnabled(Boolean safeResultHandlerEnabled) {
425       this.safeResultHandlerEnabled = safeResultHandlerEnabled;
426     }
427 
428     public Boolean getMapUnderscoreToCamelCase() {
429       return mapUnderscoreToCamelCase;
430     }
431 
432     public void setMapUnderscoreToCamelCase(Boolean mapUnderscoreToCamelCase) {
433       this.mapUnderscoreToCamelCase = mapUnderscoreToCamelCase;
434     }
435 
436     public Boolean getAggressiveLazyLoading() {
437       return aggressiveLazyLoading;
438     }
439 
440     public void setAggressiveLazyLoading(Boolean aggressiveLazyLoading) {
441       this.aggressiveLazyLoading = aggressiveLazyLoading;
442     }
443 
444     public Boolean getMultipleResultSetsEnabled() {
445       return multipleResultSetsEnabled;
446     }
447 
448     public void setMultipleResultSetsEnabled(Boolean multipleResultSetsEnabled) {
449       this.multipleResultSetsEnabled = multipleResultSetsEnabled;
450     }
451 
452     public Boolean getUseGeneratedKeys() {
453       return useGeneratedKeys;
454     }
455 
456     public void setUseGeneratedKeys(Boolean useGeneratedKeys) {
457       this.useGeneratedKeys = useGeneratedKeys;
458     }
459 
460     public Boolean getUseColumnLabel() {
461       return useColumnLabel;
462     }
463 
464     public void setUseColumnLabel(Boolean useColumnLabel) {
465       this.useColumnLabel = useColumnLabel;
466     }
467 
468     public Boolean getCacheEnabled() {
469       return cacheEnabled;
470     }
471 
472     public void setCacheEnabled(Boolean cacheEnabled) {
473       this.cacheEnabled = cacheEnabled;
474     }
475 
476     public Boolean getCallSettersOnNulls() {
477       return callSettersOnNulls;
478     }
479 
480     public void setCallSettersOnNulls(Boolean callSettersOnNulls) {
481       this.callSettersOnNulls = callSettersOnNulls;
482     }
483 
484     public Boolean getUseActualParamName() {
485       return useActualParamName;
486     }
487 
488     public void setUseActualParamName(Boolean useActualParamName) {
489       this.useActualParamName = useActualParamName;
490     }
491 
492     public Boolean getReturnInstanceForEmptyRow() {
493       return returnInstanceForEmptyRow;
494     }
495 
496     public void setReturnInstanceForEmptyRow(Boolean returnInstanceForEmptyRow) {
497       this.returnInstanceForEmptyRow = returnInstanceForEmptyRow;
498     }
499 
500     public Boolean getShrinkWhitespacesInSql() {
501       return shrinkWhitespacesInSql;
502     }
503 
504     public void setShrinkWhitespacesInSql(Boolean shrinkWhitespacesInSql) {
505       this.shrinkWhitespacesInSql = shrinkWhitespacesInSql;
506     }
507 
508     public Boolean getNullableOnForEach() {
509       return nullableOnForEach;
510     }
511 
512     public void setNullableOnForEach(Boolean nullableOnForEach) {
513       this.nullableOnForEach = nullableOnForEach;
514     }
515 
516     public Boolean getArgNameBasedConstructorAutoMapping() {
517       return argNameBasedConstructorAutoMapping;
518     }
519 
520     public void setArgNameBasedConstructorAutoMapping(Boolean argNameBasedConstructorAutoMapping) {
521       this.argNameBasedConstructorAutoMapping = argNameBasedConstructorAutoMapping;
522     }
523 
524     public String getLogPrefix() {
525       return logPrefix;
526     }
527 
528     public void setLogPrefix(String logPrefix) {
529       this.logPrefix = logPrefix;
530     }
531 
532     public Class<? extends Log> getLogImpl() {
533       return logImpl;
534     }
535 
536     public void setLogImpl(Class<? extends Log> logImpl) {
537       this.logImpl = logImpl;
538     }
539 
540     public Class<? extends VFS> getVfsImpl() {
541       return vfsImpl;
542     }
543 
544     public void setVfsImpl(Class<? extends VFS> vfsImpl) {
545       this.vfsImpl = vfsImpl;
546     }
547 
548     public Class<?> getDefaultSqlProviderType() {
549       return defaultSqlProviderType;
550     }
551 
552     public void setDefaultSqlProviderType(Class<?> defaultSqlProviderType) {
553       this.defaultSqlProviderType = defaultSqlProviderType;
554     }
555 
556     public LocalCacheScope getLocalCacheScope() {
557       return localCacheScope;
558     }
559 
560     public void setLocalCacheScope(LocalCacheScope localCacheScope) {
561       this.localCacheScope = localCacheScope;
562     }
563 
564     public JdbcType getJdbcTypeForNull() {
565       return jdbcTypeForNull;
566     }
567 
568     public void setJdbcTypeForNull(JdbcType jdbcTypeForNull) {
569       this.jdbcTypeForNull = jdbcTypeForNull;
570     }
571 
572     public Set<String> getLazyLoadTriggerMethods() {
573       return lazyLoadTriggerMethods;
574     }
575 
576     public void setLazyLoadTriggerMethods(Set<String> lazyLoadTriggerMethods) {
577       this.lazyLoadTriggerMethods = lazyLoadTriggerMethods;
578     }
579 
580     public Integer getDefaultStatementTimeout() {
581       return defaultStatementTimeout;
582     }
583 
584     public void setDefaultStatementTimeout(Integer defaultStatementTimeout) {
585       this.defaultStatementTimeout = defaultStatementTimeout;
586     }
587 
588     public Integer getDefaultFetchSize() {
589       return defaultFetchSize;
590     }
591 
592     public void setDefaultFetchSize(Integer defaultFetchSize) {
593       this.defaultFetchSize = defaultFetchSize;
594     }
595 
596     public ResultSetType getDefaultResultSetType() {
597       return defaultResultSetType;
598     }
599 
600     public void setDefaultResultSetType(ResultSetType defaultResultSetType) {
601       this.defaultResultSetType = defaultResultSetType;
602     }
603 
604     public ExecutorType getDefaultExecutorType() {
605       return defaultExecutorType;
606     }
607 
608     public void setDefaultExecutorType(ExecutorType defaultExecutorType) {
609       this.defaultExecutorType = defaultExecutorType;
610     }
611 
612     public AutoMappingBehavior getAutoMappingBehavior() {
613       return autoMappingBehavior;
614     }
615 
616     public void setAutoMappingBehavior(AutoMappingBehavior autoMappingBehavior) {
617       this.autoMappingBehavior = autoMappingBehavior;
618     }
619 
620     public AutoMappingUnknownColumnBehavior getAutoMappingUnknownColumnBehavior() {
621       return autoMappingUnknownColumnBehavior;
622     }
623 
624     public void setAutoMappingUnknownColumnBehavior(AutoMappingUnknownColumnBehavior autoMappingUnknownColumnBehavior) {
625       this.autoMappingUnknownColumnBehavior = autoMappingUnknownColumnBehavior;
626     }
627 
628     public Properties getVariables() {
629       return variables;
630     }
631 
632     public void setVariables(Properties variables) {
633       this.variables = variables;
634     }
635 
636     public Boolean getLazyLoadingEnabled() {
637       return lazyLoadingEnabled;
638     }
639 
640     public void setLazyLoadingEnabled(Boolean lazyLoadingEnabled) {
641       this.lazyLoadingEnabled = lazyLoadingEnabled;
642     }
643 
644     public Class<?> getConfigurationFactory() {
645       return configurationFactory;
646     }
647 
648     public void setConfigurationFactory(Class<?> configurationFactory) {
649       this.configurationFactory = configurationFactory;
650     }
651 
652     public Class<? extends TypeHandler> getDefaultEnumTypeHandler() {
653       return defaultEnumTypeHandler;
654     }
655 
656     public void setDefaultEnumTypeHandler(Class<? extends TypeHandler> defaultEnumTypeHandler) {
657       this.defaultEnumTypeHandler = defaultEnumTypeHandler;
658     }
659 
660     public void applyTo(Configuration target) {
661       PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull();
662       mapper.from(getSafeRowBoundsEnabled()).to(target::setSafeRowBoundsEnabled);
663       mapper.from(getSafeResultHandlerEnabled()).to(target::setSafeResultHandlerEnabled);
664       mapper.from(getMapUnderscoreToCamelCase()).to(target::setMapUnderscoreToCamelCase);
665       mapper.from(getAggressiveLazyLoading()).to(target::setAggressiveLazyLoading);
666       mapper.from(getMultipleResultSetsEnabled()).to(target::setMultipleResultSetsEnabled);
667       mapper.from(getUseGeneratedKeys()).to(target::setUseGeneratedKeys);
668       mapper.from(getUseColumnLabel()).to(target::setUseColumnLabel);
669       mapper.from(getCacheEnabled()).to(target::setCacheEnabled);
670       mapper.from(getCallSettersOnNulls()).to(target::setCallSettersOnNulls);
671       mapper.from(getUseActualParamName()).to(target::setUseActualParamName);
672       mapper.from(getReturnInstanceForEmptyRow()).to(target::setReturnInstanceForEmptyRow);
673       mapper.from(getShrinkWhitespacesInSql()).to(target::setShrinkWhitespacesInSql);
674       mapper.from(getNullableOnForEach()).to(target::setNullableOnForEach);
675       mapper.from(getArgNameBasedConstructorAutoMapping()).to(target::setArgNameBasedConstructorAutoMapping);
676       mapper.from(getLazyLoadingEnabled()).to(target::setLazyLoadingEnabled);
677       mapper.from(getLogPrefix()).to(target::setLogPrefix);
678       mapper.from(getLazyLoadTriggerMethods()).to(target::setLazyLoadTriggerMethods);
679       mapper.from(getDefaultStatementTimeout()).to(target::setDefaultStatementTimeout);
680       mapper.from(getDefaultFetchSize()).to(target::setDefaultFetchSize);
681       mapper.from(getLocalCacheScope()).to(target::setLocalCacheScope);
682       mapper.from(getJdbcTypeForNull()).to(target::setJdbcTypeForNull);
683       mapper.from(getDefaultResultSetType()).to(target::setDefaultResultSetType);
684       mapper.from(getDefaultExecutorType()).to(target::setDefaultExecutorType);
685       mapper.from(getAutoMappingBehavior()).to(target::setAutoMappingBehavior);
686       mapper.from(getAutoMappingUnknownColumnBehavior()).to(target::setAutoMappingUnknownColumnBehavior);
687       mapper.from(getVariables()).to(target::setVariables);
688       mapper.from(getLogImpl()).to(target::setLogImpl);
689       mapper.from(getVfsImpl()).to(target::setVfsImpl);
690       mapper.from(getDefaultSqlProviderType()).to(target::setDefaultSqlProviderType);
691       mapper.from(getConfigurationFactory()).to(target::setConfigurationFactory);
692       mapper.from(getDefaultEnumTypeHandler()).to(target::setDefaultEnumTypeHandler);
693     }
694 
695   }
696 
697 }