Examples of StandardBeanExpressionResolver


Examples of org.springframework.context.expression.StandardBeanExpressionResolver

   * @param beanFactory the BeanFactory to configure
   */
  protected void prepareBeanFactory(ConfigurableListableBeanFactory beanFactory) {
    // Tell the internal bean factory to use the context's class loader etc.
    beanFactory.setBeanClassLoader(getClassLoader());
    beanFactory.setBeanExpressionResolver(new StandardBeanExpressionResolver());
    beanFactory.addPropertyEditorRegistrar(new ResourceEditorRegistrar(this, this.getEnvironment()));

    // Configure the bean factory with context callbacks.
    beanFactory.addBeanPostProcessor(new ApplicationContextAwareProcessor(this));
    beanFactory.ignoreDependencyInterface(ResourceLoaderAware.class);
View Full Code Here

Examples of org.springframework.context.expression.StandardBeanExpressionResolver

   * @param beanFactory the BeanFactory to configure
   */
  protected void prepareBeanFactory(ConfigurableListableBeanFactory beanFactory) {
    // Tell the internal bean factory to use the context's class loader etc.
    beanFactory.setBeanClassLoader(getClassLoader());
    beanFactory.setBeanExpressionResolver(new StandardBeanExpressionResolver());
    beanFactory.addPropertyEditorRegistrar(new ResourceEditorRegistrar(this, getEnvironment()));

    // Configure the bean factory with context callbacks.
    beanFactory.addBeanPostProcessor(new ApplicationContextAwareProcessor(this));
    beanFactory.ignoreDependencyInterface(ResourceLoaderAware.class);
View Full Code Here

Examples of org.springframework.context.expression.StandardBeanExpressionResolver

public class ExpressionResolverFactoryPostProcessor implements BeanFactoryPostProcessor {
  @Override
  public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
      throws BeansException {
    StandardBeanExpressionResolver expressionResolver = new StandardBeanExpressionResolver();
    expressionResolver.setExpressionPrefix("#$#{");
    beanFactory.setBeanExpressionResolver(expressionResolver);
  }
View Full Code Here

Examples of org.springframework.context.expression.StandardBeanExpressionResolver

   * @param beanFactory the BeanFactory to configure
   */
  protected void prepareBeanFactory(ConfigurableListableBeanFactory beanFactory) {
    // Tell the internal bean factory to use the context's class loader etc.
    beanFactory.setBeanClassLoader(getClassLoader());
    beanFactory.setBeanExpressionResolver(new StandardBeanExpressionResolver(beanFactory.getBeanClassLoader()));
    beanFactory.addPropertyEditorRegistrar(new ResourceEditorRegistrar(this, getEnvironment()));

    // Configure the bean factory with context callbacks.
    beanFactory.addBeanPostProcessor(new ApplicationContextAwareProcessor(this));
    beanFactory.ignoreDependencyInterface(ResourceLoaderAware.class);
View Full Code Here

Examples of org.springframework.context.expression.StandardBeanExpressionResolver

  @Override
  protected void setUp() throws Exception {
    this.beanFactory = new DefaultListableBeanFactory();
    this.beanFactory.registerScope("request", new RequestScope());
    this.beanFactory.setBeanExpressionResolver(new StandardBeanExpressionResolver());
    XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this.beanFactory);
    reader.loadBeanDefinitions(new ClassPathResource("requestScopeTests.xml", getClass()));
    this.beanFactory.preInstantiateSingletons();
  }
View Full Code Here

Examples of org.springframework.context.expression.StandardBeanExpressionResolver

   * @param beanFactory the BeanFactory to configure
   */
  protected void prepareBeanFactory(ConfigurableListableBeanFactory beanFactory) {
    // Tell the internal bean factory to use the context's class loader etc.
    beanFactory.setBeanClassLoader(getClassLoader());
    beanFactory.setBeanExpressionResolver(new StandardBeanExpressionResolver());
    beanFactory.addPropertyEditorRegistrar(new ResourceEditorRegistrar(this));

    // Configure the bean factory with context callbacks.
    beanFactory.addBeanPostProcessor(new ApplicationContextAwareProcessor(this));
    beanFactory.ignoreDependencyInterface(ResourceLoaderAware.class);
View Full Code Here

Examples of org.springframework.context.expression.StandardBeanExpressionResolver

   * @param beanFactory the BeanFactory to configure
   */
  protected void prepareBeanFactory(ConfigurableListableBeanFactory beanFactory) {
    // Tell the internal bean factory to use the context's class loader etc.
    beanFactory.setBeanClassLoader(getClassLoader());
    beanFactory.setBeanExpressionResolver(new StandardBeanExpressionResolver());
    beanFactory.addPropertyEditorRegistrar(new ResourceEditorRegistrar(this));

    // Configure the bean factory with context callbacks.
    beanFactory.addBeanPostProcessor(new ApplicationContextAwareProcessor(this));
    beanFactory.ignoreDependencyInterface(ResourceLoaderAware.class);
View Full Code Here

Examples of org.springframework.context.expression.StandardBeanExpressionResolver

    ConfigurableListableBeanFactory configurableListableBeanFactory = (ConfigurableListableBeanFactory) beanFactory;

    BeanExpressionContext beanExpressionContext = new BeanExpressionContext(configurableListableBeanFactory,
        configurableListableBeanFactory.getBean(StepScope.class));

    this.jsrExpressionParser = new JsrExpressionParser(new StandardBeanExpressionResolver(), beanExpressionContext);
  }
View Full Code Here

Examples of org.springframework.context.expression.StandardBeanExpressionResolver

  @Override
  public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      ConfigurableBeanFactory cbf = (ConfigurableBeanFactory) beanFactory;
      cbf.setBeanExpressionResolver(new StandardBeanExpressionResolver() {
        @Override
        protected void customizeEvaluationContext(StandardEvaluationContext evalContext) {
          evalContext.addMethodResolver(new CabConfigurationReflectiveMethodResolver());
        }
      });
View Full Code Here

Examples of org.springframework.context.expression.StandardBeanExpressionResolver

    ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
    BeanExpressionResolver resolver = beanFactory.getBeanExpressionResolver();
    BeanExpressionContext expressionContext = (beanFactory != null) ? new BeanExpressionContext(
        beanFactory, null) : null;
    if (resolver == null) {
      resolver = new StandardBeanExpressionResolver();
    }
    boolean result = (Boolean) resolver.evaluate(expression, expressionContext);

    StringBuilder message = new StringBuilder("SpEL expression");
    if (metadata instanceof ClassMetadata) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.