クラス SpelParserConfiguration

java.lang.ObjectSE
org.springframework.expression.spel.SpelParserConfiguration

public class SpelParserConfiguration extends ObjectSE
SpEL 式パーサーの構成オブジェクト。
導入:
3.0
作成者:
Juergen Hoeller, Phillip Webb, Andy Clement, Sam Brannen
関連事項:
  • フィールドの詳細

    • DEFAULT_MAX_EXPRESSION_LENGTH

      public static final int DEFAULT_MAX_EXPRESSION_LENGTH
      SpEL 式に許可されるデフォルトの最大長: 10000。
      導入:
      5.2.24
      関連事項:
    • DEFAULT_MAX_OPERATIONS

      public static final int DEFAULT_MAX_OPERATIONS
      SpEL 式の評価中に許可されるデフォルトの最大操作数: 10000。
      導入:
      6.2.19
      関連事項:
    • SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME

      public static final StringSE SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME
      SpEL 式パーサーのデフォルトのコンパイラーモードを構成するためのシステムプロパティ: "spring.expression.compiler.mode"。

      注意 : アプリケーションやフレームワークは、グローバルなデフォルト値に依存するのではなく、SpelParserConfiguration(SpelCompilerMode, ClassLoader, boolean, boolean, int, int, int) コンストラクターを介して明示的なカスタム値を設定することが理想的です。これにより、完全な構成制御が可能になり、ユースケースごとにグローバルなデフォルト値を上書きできるようになります。

      SpringProperties メカニズムを介して構成することもできます。

      関連事項:
    • SPRING_EXPRESSION_MAX_OPERATIONS_PROPERTY_NAME

      public static final StringSE SPRING_EXPRESSION_MAX_OPERATIONS_PROPERTY_NAME
      SpEL 式の評価中に許可されるデフォルトの最大操作数を設定するシステムプロパティ: "spring.expression.maxOperations"。

      注意 : アプリケーションやフレームワークは、グローバルなデフォルト値に依存するのではなく、SpelParserConfiguration(SpelCompilerMode, ClassLoader, boolean, boolean, int, int, int) コンストラクターを介して明示的なカスタム値を設定することが理想的です。これにより、完全な構成制御が可能になり、ユースケースごとにグローバルなデフォルト値を上書きできるようになります。

      SpringProperties メカニズムを介して構成することもできます。

      導入:
      6.2.19
      関連事項:
  • コンストラクターの詳細

    • SpelParserConfiguration

      public SpelParserConfiguration()
      デフォルト設定で新しい SpelParserConfiguration インスタンスを作成します。

      注意 : 完全な構成制御と、ユースケースごとにグローバルなデフォルト設定を上書きできる機能を利用するには、SpelParserConfiguration(SpelCompilerMode, ClassLoader, boolean, boolean, int, int, int) コンストラクターの使用をお勧めします。

      関連事項:
    • SpelParserConfiguration

      public SpelParserConfiguration(@Nullable SpelCompilerMode compilerMode, @Nullable ClassLoaderSE compilerClassLoader)
      新しい SpelParserConfiguration インスタンスを作成します。

      注意 : 完全な構成制御と、ユースケースごとにグローバルなデフォルト設定を上書きできる機能を利用するには、SpelParserConfiguration(SpelCompilerMode, ClassLoader, boolean, boolean, int, int, int) コンストラクターの使用をお勧めします。

      パラメーター:
      compilerMode - この設定を使用するパーサーが使用するコンパイラーモード。または、デフォルトモードを使用する null
      compilerClassLoader - 式コンパイルのベースとして使用する場合は ClassLoader、デフォルトの ClassLoader を使用する場合は null を指定します。
      関連事項:
    • SpelParserConfiguration

      public SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections)
      新しい SpelParserConfiguration インスタンスを作成します。

      注意 : 完全な構成制御と、ユースケースごとにグローバルなデフォルト設定を上書きできる機能を利用するには、SpelParserConfiguration(SpelCompilerMode, ClassLoader, boolean, boolean, int, int, int) コンストラクターの使用をお勧めします。

      パラメーター:
      autoGrowNullReferences - null 参照が自動的に大きくなる場合
      autoGrowCollections - コレクションが自動的に拡大する場合
      関連事項:
    • SpelParserConfiguration

      public SpelParserConfiguration(boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize)
      新しい SpelParserConfiguration インスタンスを作成します。

      注意 : 完全な構成制御と、ユースケースごとにグローバルなデフォルト設定を上書きできる機能を利用するには、SpelParserConfiguration(SpelCompilerMode, ClassLoader, boolean, boolean, int, int, int) コンストラクターの使用をお勧めします。

      パラメーター:
      autoGrowNullReferences - null 参照が自動的に大きくなる場合
      autoGrowCollections - コレクションが自動的に拡大する場合
      maximumAutoGrowSize - コレクションが自動的に拡張できる最大サイズ
      関連事項:
    • SpelParserConfiguration

      public SpelParserConfiguration(@Nullable SpelCompilerMode compilerMode, @Nullable ClassLoaderSE compilerClassLoader, boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize)
      新しい SpelParserConfiguration インスタンスを作成します。

      注意 : 完全な構成制御と、ユースケースごとにグローバルなデフォルト設定を上書きできる機能を利用するには、SpelParserConfiguration(SpelCompilerMode, ClassLoader, boolean, boolean, int, int, int) コンストラクターの使用をお勧めします。

      パラメーター:
      compilerMode - この設定を使用するパーサーが使用するコンパイラーモード。または、デフォルトモードを使用する null
      compilerClassLoader - 式コンパイルのベースとして使用する場合は ClassLoader、デフォルトの ClassLoader を使用する場合は null を指定します。
      autoGrowNullReferences - null 参照が自動的に大きくなる場合
      autoGrowCollections - コレクションが自動的に拡大する場合
      maximumAutoGrowSize - コレクションが自動的に拡張できる最大サイズ
      関連事項:
    • SpelParserConfiguration

      public SpelParserConfiguration(@Nullable SpelCompilerMode compilerMode, @Nullable ClassLoaderSE compilerClassLoader, boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize, int maximumExpressionLength)
      新しい SpelParserConfiguration インスタンスを作成します。

      注意 : 完全な構成制御と、ユースケースごとにグローバルなデフォルト設定を上書きできる機能を利用するには、SpelParserConfiguration(SpelCompilerMode, ClassLoader, boolean, boolean, int, int, int) コンストラクターの使用をお勧めします。

      パラメーター:
      compilerMode - この設定を使用するパーサーが使用するコンパイラーモード。または、デフォルトモードを使用する null
      compilerClassLoader - 式コンパイルのベースとして使用する場合は ClassLoader、デフォルトの ClassLoader を使用する場合は null を指定します。
      autoGrowNullReferences - null 参照が自動的に大きくなる場合
      autoGrowCollections - コレクションが自動的に拡大する場合
      maximumAutoGrowSize - コレクションが自動的に拡張できる最大サイズ
      maximumExpressionLength - SpEL 式の最大長。正の数でなければなりません
      導入:
      5.2.25
      関連事項:
    • SpelParserConfiguration

      public SpelParserConfiguration(SpelCompilerMode compilerMode, @Nullable ClassLoaderSE compilerClassLoader, boolean autoGrowNullReferences, boolean autoGrowCollections, int maximumAutoGrowSize, int maximumExpressionLength, int maximumOperations)
      新しい SpelParserConfiguration インスタンスを作成します。
      パラメーター:
      compilerMode - この設定を使用するパーサーが使用するコンパイラーモード。null であってはならない
      compilerClassLoader - 式コンパイルのベースとして使用する場合は ClassLoader、デフォルトの ClassLoader を使用する場合は null を指定します。
      autoGrowNullReferences - null 参照が自動的に大きくなる場合
      autoGrowCollections - コレクションが自動的に拡大する場合
      maximumAutoGrowSize - コレクションが自動的に拡張できる最大サイズ
      maximumExpressionLength - SpEL 式の最大長。正の数でなければなりません
      maximumOperations - SpEL 式評価中に許可される最大演算回数。正の数である必要があります
      導入:
      6.2.19
  • 方法の詳細

    • getCompilerMode

      public SpelCompilerMode getCompilerMode()
      この構成オブジェクトを使用して、パーサーのコンパイラーモードを返します。
    • getCompilerClassLoader

      public @Nullable ClassLoaderSE getCompilerClassLoader()
      式コンパイルのベースとして使用する ClassLoader を返します。
    • isAutoGrowNullReferences

      public boolean isAutoGrowNullReferences()
      null 参照を自動的に拡張する必要がある場合は、true を返します。
    • isAutoGrowCollections

      public boolean isAutoGrowCollections()
      コレクションを自動的に拡張する必要がある場合は、true を返します。
    • getMaximumAutoGrowSize

      public int getMaximumAutoGrowSize()
      コレクションが自動的に拡張できる最大サイズを返します。
    • getMaximumExpressionLength

      public int getMaximumExpressionLength()
      SpEL 式に含めることができる最大文字数を返します。
      導入:
      5.2.25
    • getMaximumOperations

      public int getMaximumOperations()
      SpEL 式の評価中に許可される最大演算数を返します。
      導入:
      6.2.19