Examples of afterPropertiesSet()


Examples of org.springframework.transaction.support.TransactionTemplate.afterPropertiesSet()

    }

    protected TransactionTemplate createTransactionTemplate() {
        TransactionTemplate transactionTemplate = new TransactionTemplate(getTransactionManager());
        transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
        transactionTemplate.afterPropertiesSet();
        return transactionTemplate;
    }

    protected Expression createProducerExpression() {
        return new ExpressionAdapter() {
View Full Code Here

Examples of org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean.afterPropertiesSet()

    fcfb.setConfigLocation(new FileSystemResource("myprops.properties"));
    Properties props = new Properties();
    props.setProperty("myprop", "/mydir");
    fcfb.setFreemarkerSettings(props);
    try {
      fcfb.afterPropertiesSet();
      fail("Should have thrown IOException");
    }
    catch (IOException ex) {
      // expected
    }
View Full Code Here

Examples of org.springframework.ui.velocity.VelocityEngineFactoryBean.afterPropertiesSet()

    vefb.setConfigLocation(new FileSystemResource("myprops.properties"));
    Properties props = new Properties();
    props.setProperty("myprop", "/mydir");
    vefb.setVelocityProperties(props);
    try {
      vefb.afterPropertiesSet();
      fail("Should have thrown IOException");
    }
    catch (IOException ex) {
      // expected
    }
View Full Code Here

Examples of org.springframework.validation.beanvalidation.CustomValidatorBean.afterPropertiesSet()

    catch (InvalidPropertyException e) {
      dataBinder.getBindingResult().addError(new FieldError("options", e.getPropertyName(), e.getMessage()));
    }

    CustomValidatorBean validator = new CustomValidatorBean();
    validator.afterPropertiesSet();
    dataBinder.setValidator(validator);

    Class<?>[] groups = determineGroupsToUse(beanWrapper.getWrappedInstance());
    dataBinder.validate((Object[]) groups);
View Full Code Here

Examples of org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet()

    }

    private Validator getValidator() {
        if (this.validator == null) {
            LocalValidatorFactoryBean localValidatorFactoryBean = new LocalValidatorFactoryBean();
            localValidatorFactoryBean.afterPropertiesSet();
            this.validator = localValidatorFactoryBean;
        }
        return this.validator;
    }
View Full Code Here

Examples of org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver.afterPropertiesSet()

   * </ul>
   */
  protected final void addDefaultHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) {
    ExceptionHandlerExceptionResolver exceptionHandlerExceptionResolver = new ExceptionHandlerExceptionResolver();
    exceptionHandlerExceptionResolver.setMessageConverters(getMessageConverters());
    exceptionHandlerExceptionResolver.afterPropertiesSet();

    exceptionResolvers.add(exceptionHandlerExceptionResolver);
    exceptionResolvers.add(new ResponseStatusExceptionResolver());
    exceptionResolvers.add(new DefaultHandlerExceptionResolver());
  }
View Full Code Here

Examples of org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.afterPropertiesSet()

    cxt.addBean("requestMappingHandlerMapping", handlerMapping);

    RequestMappingHandlerAdapter handlerAdapter = configuration.requestMappingHandlerAdapter();
    handlerAdapter.setServletContext(cxt.getServletContext());
    handlerAdapter.setApplicationContext(cxt);
    handlerAdapter.afterPropertiesSet();
    cxt.addBean("requestMappingHandlerAdapter", handlerAdapter);

    cxt.addBean("handlerExceptionResolver", configuration.handlerExceptionResolver());

    cxt.addBeans(initViewResolvers(cxt));
View Full Code Here

Examples of org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet()

  @Test
  public void handlerMappings() throws Exception {
    RequestMappingHandlerMapping rmHandlerMapping = this.config.requestMappingHandlerMapping();
    rmHandlerMapping.setApplicationContext(this.context);
    rmHandlerMapping.afterPropertiesSet();
    assertEquals(TestPathHelper.class, rmHandlerMapping.getUrlPathHelper().getClass());
    assertEquals(TestPathMatcher.class, rmHandlerMapping.getPathMatcher().getClass());
    HandlerExecutionChain chain = rmHandlerMapping.getHandler(new MockHttpServletRequest("GET", "/"));
    assertNotNull(chain.getInterceptors());
    assertEquals(3, chain.getInterceptors().length);
View Full Code Here

Examples of org.springframework.web.servlet.resource.ResourceHttpRequestHandler.afterPropertiesSet()

      for (String pathPattern : registration.getPathPatterns()) {
        ResourceHttpRequestHandler handler = registration.getRequestHandler();
        handler.setServletContext(this.servletContext);
        handler.setApplicationContext(this.appContext);
        try {
          handler.afterPropertiesSet();
        }
        catch (Exception e) {
          throw new BeanInitializationException("Failed to init ResourceHttpRequestHandler", e);
        }
        urlMap.put(pathPattern, handler);
View Full Code Here

Examples of org.springframework.web.servlet.view.AbstractUrlBasedView.afterPropertiesSet()

    }
   
    protected View createJstlView(String viewName) throws Exception {
        AbstractUrlBasedView view = buildView(viewName);
        view.setApplicationContext(getApplicationContext());
        view.afterPropertiesSet();
        return view;
    }

    @Autowired(required=true)
    @Qualifier(GroovyPagesTemplateEngine.BEAN_ID)
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.