Package org.springframework.context.expression

Examples of org.springframework.context.expression.MapAccessor$MapAccessException


      // we were given a context, so don't register anything
      context = (StandardEvaluationContext) evaluationContext;
    } else {
      context = new StandardEvaluationContext();
      context.addMethodResolver(new PartitionKeyMethodResolver());
      context.addPropertyAccessor(new MapAccessor());
    }
  }
View Full Code Here


         StandardEvaluationContext sec = new StandardEvaluationContext();
         sec.setRootObject(beanEvaluationContext);
         sec.addPropertyAccessor(new BeanExpressionContextAccessor());
         sec.addPropertyAccessor(new BeanFactoryAccessor());
         sec.addPropertyAccessor(new MapAccessor());
         sec.setBeanResolver(new BeanFactoryResolver(beanEvaluationContext.getBeanFactory()));
         sec.setTypeLocator(new StandardTypeLocator(beanEvaluationContext.getBeanFactory().getBeanClassLoader()));
         ConversionService conversionService = beanEvaluationContext.getBeanFactory().getConversionService();
         if (conversionService != null) {
            sec.setTypeConverter(new StandardTypeConverter(conversionService));
View Full Code Here

   * @return the evaluation context.
   */
  private static StandardEvaluationContext createStandardEvaluationContext(ConversionService conversionService,
      BeanFactory beanFactory) {
    StandardEvaluationContext evaluationContext = new StandardEvaluationContext();
    evaluationContext.addPropertyAccessor(new MapAccessor());
    if (conversionService != null) {
      evaluationContext.setTypeConverter(new StandardTypeConverter(conversionService));
    }
    if (beanFactory != null) {
      evaluationContext.setBeanResolver(new BeanFactoryResolver(beanFactory));
View Full Code Here

  }

  private EvaluationContext createEvaluationContext(PageContext pageContext) {
    StandardEvaluationContext context = new StandardEvaluationContext();
    context.addPropertyAccessor(new JspPropertyAccessor(pageContext));
    context.addPropertyAccessor(new MapAccessor());
    context.addPropertyAccessor(new EnvironmentAccessor());
    context.setBeanResolver(new BeanFactoryResolver(getRequestContext().getWebApplicationContext()));
    ConversionService conversionService = getConversionService(pageContext);
    if (conversionService != null) {
      context.setTypeConverter(new StandardTypeConverter(conversionService));
View Full Code Here

    this(expressionParser, new DefaultConversionService());
  }

  public SpringELExpressionParser(SpelExpressionParser expressionParser, ConversionService conversionService) {
    this.expressionParser = expressionParser;
    this.propertyAccessors.add(new MapAccessor());
    this.conversionService = conversionService;
  }
View Full Code Here

  private PlaceholderResolver resolver;

  public SpelView(String template) {
    this.template = template;
    this.context.addPropertyAccessor(new MapAccessor());
    this.helper = new PropertyPlaceholderHelper("${", "}");
    this.resolver = new PlaceholderResolver() {
      public String resolvePlaceholder(String name) {
        Expression expression = parser.parseExpression(name);
        Object value = expression.getValue(context);
View Full Code Here

  }

  private EvaluationContext createEvaluationContext(PageContext pageContext) {
    StandardEvaluationContext context = new StandardEvaluationContext();
    context.addPropertyAccessor(new JspPropertyAccessor(pageContext));
    context.addPropertyAccessor(new MapAccessor());
    context.addPropertyAccessor(new EnvironmentAccessor());
    context.setBeanResolver(new BeanFactoryResolver(getRequestContext().getWebApplicationContext()));
    ConversionService conversionService = getConversionService(pageContext);
    if (conversionService != null) {
      context.setTypeConverter(new StandardTypeConverter(conversionService));
View Full Code Here

      target = new MappingJsonFactory().createJsonParser(content.replace("\\","/")).readValueAs(Map.class);
    } catch (JsonParseException e) {
      throw new JsonMappingException("Cannot create wrapper for:\n"+content, e);
    }
    context = new StandardEvaluationContext();
    context.addPropertyAccessor(new MapAccessor());
    parser = new SpelExpressionParser();
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public JsonWrapper(String content) throws Exception {
    target = new MappingJsonFactory().createJsonParser(content).readValueAs(Map.class);
    context = new StandardEvaluationContext();
    context.addPropertyAccessor(new MapAccessor());
    parser = new SpelExpressionParser();
  }
View Full Code Here

  /**
   * Creates a container matcher instance and prepares the SpEL evaluation context to support Map properties directly.
   */
  public DefaultContainerMatcher() {
    evaluationContext.addPropertyAccessor(new MapAccessor());
  }
View Full Code Here

TOP

Related Classes of org.springframework.context.expression.MapAccessor$MapAccessException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.