Adds LocalizedTextUtil as a bean
Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/fa1a5f9e Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/fa1a5f9e Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/fa1a5f9e Branch: refs/heads/master Commit: fa1a5f9e6927ab7521c30366631e128371d41277 Parents: ae09c6a Author: Lukasz Lenart <lukaszlen...@apache.org> Authored: Wed Mar 8 17:42:13 2017 +0100 Committer: Lukasz Lenart <lukaszlen...@apache.org> Committed: Wed Mar 8 17:42:13 2017 +0100 ---------------------------------------------------------------------- .../opensymphony/xwork2/config/impl/DefaultConfiguration.java | 4 ++++ .../xwork2/config/providers/XWorkConfigurationProvider.java | 4 ++++ 2 files changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/fa1a5f9e/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java index 08977b2..31bf283 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java @@ -246,6 +246,8 @@ public class DefaultConfiguration implements Configuration { builder.factory(ReflectionProvider.class, OgnlReflectionProvider.class, Scope.SINGLETON); builder.factory(ValueStackFactory.class, OgnlValueStackFactory.class, Scope.SINGLETON); + builder.factory(LocalizedTextUtil.class, LocalizedTextUtil.class, Scope.SINGLETON); + builder.factory(XWorkConverter.class, Scope.SINGLETON); builder.factory(ConversionPropertiesProcessor.class, DefaultConversionPropertiesProcessor.class, Scope.SINGLETON); builder.factory(ConversionFileProcessor.class, DefaultConversionFileProcessor.class, Scope.SINGLETON); @@ -270,10 +272,12 @@ public class DefaultConfiguration implements Configuration { builder.factory(ValueSubstitutor.class, EnvsValueSubstitutor.class, Scope.SINGLETON); builder.constant(XWorkConstants.DEV_MODE, "false"); + builder.constant(StrutsConstants.STRUTS_DEVMODE, "false"); builder.constant(XWorkConstants.LOG_MISSING_PROPERTIES, "false"); builder.constant(XWorkConstants.ENABLE_OGNL_EVAL_EXPRESSION, "false"); builder.constant(XWorkConstants.ENABLE_OGNL_EXPRESSION_CACHE, "true"); builder.constant(XWorkConstants.RELOAD_XML_CONFIGURATION, "false"); + builder.constant(StrutsConstants.STRUTS_I18N_RELOAD, "false"); return builder.create(true); } http://git-wip-us.apache.org/repos/asf/struts/blob/fa1a5f9e/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java index fc335d8..de0b963 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java @@ -70,6 +70,7 @@ import com.opensymphony.xwork2.ognl.accessor.XWorkListPropertyAccessor; import com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor; import com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor; import com.opensymphony.xwork2.util.CompoundRoot; +import com.opensymphony.xwork2.util.LocalizedTextUtil; import com.opensymphony.xwork2.util.OgnlTextParser; import com.opensymphony.xwork2.util.PatternMatcher; import com.opensymphony.xwork2.util.TextParser; @@ -177,6 +178,7 @@ public class XWorkConfigurationProvider implements ConfigurationProvider { .factory(NullHandler.class, Object.class.getName(), InstantiatingNullHandler.class, Scope.SINGLETON) .factory(ActionValidatorManager.class, AnnotationActionValidatorManager.class, Scope.SINGLETON) .factory(ActionValidatorManager.class, "no-annotations", DefaultActionValidatorManager.class, Scope.SINGLETON) + .factory(LocalizedTextUtil.class, LocalizedTextUtil.class, Scope.SINGLETON) .factory(TextProvider.class, "system", DefaultTextProvider.class, Scope.SINGLETON) .factory(TextProvider.class, TextProviderSupport.class, Scope.SINGLETON) .factory(LocaleProvider.class, DefaultLocaleProvider.class, Scope.SINGLETON) @@ -194,6 +196,8 @@ public class XWorkConfigurationProvider implements ConfigurationProvider { ; props.setProperty(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION, Boolean.FALSE.toString()); + props.setProperty(StrutsConstants.STRUTS_I18N_RELOAD, Boolean.FALSE.toString()); + props.setProperty(StrutsConstants.STRUTS_DEVMODE, Boolean.FALSE.toString()); props.setProperty(XWorkConstants.DEV_MODE, Boolean.FALSE.toString()); props.setProperty(XWorkConstants.LOG_MISSING_PROPERTIES, Boolean.FALSE.toString()); props.setProperty(XWorkConstants.ENABLE_OGNL_EXPRESSION_CACHE, Boolean.TRUE.toString());