You can configure BeansWrapper like that with setMethodAppearanceFineTuner. For the sake of hasty copy-pasters, I will use here a builder instead of new, DefaultObjectWrapper instead of BeansWrapper, and VERSION_2_3_25 instead of VERSION_2_3_0, but this also works with your setup:DefaultObjectWrapperBuilder owb = new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_25);owb.setMethodAppearanceFineTuner(new MethodAppearanceFineTuner() { @Override public void process(MethodAppearanceDecisionInput in, MethodAppearanceDecision out) { out.setMethodShadowsProperty(false); }});cfg.setObjectWrapper(owb.build());就JavaDoc中的实验性"免责声明而言,请放心,这些免责声明将在2.3.26版中处于实验状态.As of the "experimental" disclaimers in the JavaDoc, don't worry, these will leave experimental status in 2.3.26. 这篇关于Freemarker-仅将getter用于bean的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-19 02:45