Example usage for org.springframework.expression.spel.support SimpleEvaluationContext forReadOnlyDataBinding

List of usage examples for org.springframework.expression.spel.support SimpleEvaluationContext forReadOnlyDataBinding

Introduction

In this page you can find the example usage for org.springframework.expression.spel.support SimpleEvaluationContext forReadOnlyDataBinding.

Prototype

public static Builder forReadOnlyDataBinding() 

Source Link

Document

Create a SimpleEvaluationContext for read-only access to public properties via DataBindingPropertyAccessor .

Usage

From source file:org.springframework.cloud.gateway.discovery.DiscoveryClientRouteDefinitionLocator.java

public DiscoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient,
        DiscoveryLocatorProperties properties) {
    this.discoveryClient = discoveryClient;
    this.properties = properties;
    if (StringUtils.hasText(properties.getRouteIdPrefix())) {
        this.routeIdPrefix = properties.getRouteIdPrefix();
    } else {/*from www . j  a  v a 2  s .co  m*/
        this.routeIdPrefix = this.discoveryClient.getClass().getSimpleName() + "_";
    }
    evalCtxt = SimpleEvaluationContext.forReadOnlyDataBinding().withInstanceMethods().build();
}