Link to known property name constants in SpringProperties
This commit is contained in:
parent
c649b74235
commit
8589804012
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2020 the original author or authors.
|
* Copyright 2002-2021 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -38,9 +38,14 @@ import org.springframework.lang.Nullable;
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 3.2.7
|
* @since 3.2.7
|
||||||
* @see org.springframework.core.env.AbstractEnvironment#IGNORE_GETENV_PROPERTY_NAME
|
|
||||||
* @see org.springframework.beans.CachedIntrospectionResults#IGNORE_BEANINFO_PROPERTY_NAME
|
* @see org.springframework.beans.CachedIntrospectionResults#IGNORE_BEANINFO_PROPERTY_NAME
|
||||||
|
* @see org.springframework.context.index.CandidateComponentsIndexLoader#IGNORE_INDEX
|
||||||
|
* @see org.springframework.core.env.AbstractEnvironment#IGNORE_GETENV_PROPERTY_NAME
|
||||||
|
* @see org.springframework.expression.spel.SpelParserConfiguration#SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME
|
||||||
* @see org.springframework.jdbc.core.StatementCreatorUtils#IGNORE_GETPARAMETERTYPE_PROPERTY_NAME
|
* @see org.springframework.jdbc.core.StatementCreatorUtils#IGNORE_GETPARAMETERTYPE_PROPERTY_NAME
|
||||||
|
* @see org.springframework.jndi.JndiLocatorDelegate#IGNORE_JNDI_PROPERTY_NAME
|
||||||
|
* @see org.springframework.test.context.NestedTestConfiguration#ENCLOSING_CONFIGURATION_PROPERTY_NAME
|
||||||
|
* @see org.springframework.test.context.TestConstructor#TEST_CONSTRUCTOR_AUTOWIRE_MODE_PROPERTY_NAME
|
||||||
* @see org.springframework.test.context.cache.ContextCache#MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME
|
* @see org.springframework.test.context.cache.ContextCache#MAX_CONTEXT_CACHE_SIZE_PROPERTY_NAME
|
||||||
*/
|
*/
|
||||||
public final class SpringProperties {
|
public final class SpringProperties {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2017 the original author or authors.
|
* Copyright 2002-2021 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -30,10 +30,17 @@ import org.springframework.lang.Nullable;
|
||||||
*/
|
*/
|
||||||
public class SpelParserConfiguration {
|
public class SpelParserConfiguration {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* System property that is used to configure the default compiler mode for
|
||||||
|
* SpEL expression parsers: {@value}
|
||||||
|
*/
|
||||||
|
public static final String SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME = "spring.expression.compiler.mode";
|
||||||
|
|
||||||
|
|
||||||
private static final SpelCompilerMode defaultCompilerMode;
|
private static final SpelCompilerMode defaultCompilerMode;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
String compilerMode = SpringProperties.getProperty("spring.expression.compiler.mode");
|
String compilerMode = SpringProperties.getProperty(SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME);
|
||||||
defaultCompilerMode = (compilerMode != null ?
|
defaultCompilerMode = (compilerMode != null ?
|
||||||
SpelCompilerMode.valueOf(compilerMode.toUpperCase()) : SpelCompilerMode.OFF);
|
SpelCompilerMode.valueOf(compilerMode.toUpperCase()) : SpelCompilerMode.OFF);
|
||||||
}
|
}
|
||||||
|
@ -107,7 +114,7 @@ public class SpelParserConfiguration {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the configuration mode for parsers using this configuration object.
|
* Return the compiler mode for parsers using this configuration object.
|
||||||
*/
|
*/
|
||||||
public SpelCompilerMode getCompilerMode() {
|
public SpelCompilerMode getCompilerMode() {
|
||||||
return this.compilerMode;
|
return this.compilerMode;
|
||||||
|
|
Loading…
Reference in New Issue