Tabnine Logo
MergedContextConfiguration.getContextCustomizers
Code IndexAdd Tabnine to your IDE (free)

How to use
getContextCustomizers
method
in
org.springframework.test.context.MergedContextConfiguration

Best Java code snippets using org.springframework.test.context.MergedContextConfiguration.getContextCustomizers (Showing top 8 results out of 315)

origin: spring-projects/spring-framework

/**
 * Customize the {@link ConfigurableApplicationContext} created by this
 * {@code ContextLoader} <em>after</em> bean definitions have been loaded
 * into the context but <em>before</em> the context has been refreshed.
 * <p>The default implementation delegates to all
 * {@link MergedContextConfiguration#getContextCustomizers context customizers}
 * that have been registered with the supplied {@code mergedConfig}.
 * @param context the newly created application context
 * @param mergedConfig the merged context configuration
 * @since 4.3
 */
protected void customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) {
  for (ContextCustomizer contextCustomizer : mergedConfig.getContextCustomizers()) {
    contextCustomizer.customizeContext(context, mergedConfig);
  }
}
origin: spring-projects/spring-framework

if (!mergedConfig.getContextInitializerClasses().isEmpty() || !mergedConfig.getContextCustomizers().isEmpty()) {
  return delegateLoading(getAnnotationConfigLoader(), mergedConfig);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test

/**
 * Customize the {@link ConfigurableApplicationContext} created by this
 * {@code ContextLoader} <em>after</em> bean definitions have been loaded
 * into the context but <em>before</em> the context has been refreshed.
 * <p>The default implementation delegates to all
 * {@link MergedContextConfiguration#getContextCustomizers context customizers}
 * that have been registered with the supplied {@code mergedConfig}.
 * @param context the newly created application context
 * @param mergedConfig the merged context configuration
 * @since 4.3
 */
protected void customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) {
  for (ContextCustomizer contextCustomizer : mergedConfig.getContextCustomizers()) {
    contextCustomizer.customizeContext(context, mergedConfig);
  }
}
origin: apache/servicemix-bundles

/**
 * Customize the {@link ConfigurableApplicationContext} created by this
 * {@code ContextLoader} <em>after</em> bean definitions have been loaded
 * into the context but <em>before</em> the context has been refreshed.
 * <p>The default implementation delegates to all
 * {@link MergedContextConfiguration#getContextCustomizers context customizers}
 * that have been registered with the supplied {@code mergedConfig}.
 * @param context the newly created application context
 * @param mergedConfig the merged context configuration
 * @since 4.3
 */
protected void customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) {
  for (ContextCustomizer contextCustomizer : mergedConfig.getContextCustomizers()) {
    contextCustomizer.customizeContext(context, mergedConfig);
  }
}
origin: org.springframework.boot/spring-boot-test

/**
 * Return the {@link ApplicationContextInitializer initializers} that will be applied
 * to the context. By default this method will adapt {@link ContextCustomizer context
 * customizers}, add {@link SpringApplication#getInitializers() application
 * initializers} and add
 * {@link MergedContextConfiguration#getContextInitializerClasses() initializers
 * specified on the test}.
 * @param config the source context configuration
 * @param application the application instance
 * @return the initializers to apply
 * @since 2.0.0
 */
protected List<ApplicationContextInitializer<?>> getInitializers(
    MergedContextConfiguration config, SpringApplication application) {
  List<ApplicationContextInitializer<?>> initializers = new ArrayList<>();
  for (ContextCustomizer contextCustomizer : config.getContextCustomizers()) {
    initializers.add(new ContextCustomizerAdapter(contextCustomizer, config));
  }
  initializers.addAll(application.getInitializers());
  for (Class<? extends ApplicationContextInitializer<?>> initializerClass : config
      .getContextInitializerClasses()) {
    initializers.add(BeanUtils.instantiateClass(initializerClass));
  }
  if (config.getParent() != null) {
    initializers.add(new ParentContextApplicationContextInitializer(
        config.getParentApplicationContext()));
  }
  return initializers;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test

if (!mergedConfig.getContextInitializerClasses().isEmpty() || !mergedConfig.getContextCustomizers().isEmpty()) {
  return delegateLoading(getAnnotationConfigLoader(), mergedConfig);
origin: apache/servicemix-bundles

if (!mergedConfig.getContextInitializerClasses().isEmpty() || !mergedConfig.getContextCustomizers().isEmpty()) {
  return delegateLoading(getAnnotationConfigLoader(), mergedConfig);
origin: org.springframework.boot/spring-boot-test

/**
 * Create a new {@link MergedContextConfiguration} with different classes and
 * properties.
 * @param mergedConfig the source config
 * @param classes the replacement classes
 * @param propertySourceProperties the replacement properties
 * @return a new {@link MergedContextConfiguration}
 */
protected final MergedContextConfiguration createModifiedConfig(
    MergedContextConfiguration mergedConfig, Class<?>[] classes,
    String[] propertySourceProperties) {
  return new MergedContextConfiguration(mergedConfig.getTestClass(),
      mergedConfig.getLocations(), classes,
      mergedConfig.getContextInitializerClasses(),
      mergedConfig.getActiveProfiles(),
      mergedConfig.getPropertySourceLocations(), propertySourceProperties,
      mergedConfig.getContextCustomizers(), mergedConfig.getContextLoader(),
      getCacheAwareContextLoaderDelegate(), mergedConfig.getParent());
}
org.springframework.test.contextMergedContextConfigurationgetContextCustomizers

Javadoc

Get the merged ContextCustomizer that will be applied when the application context is loaded.

Popular methods of MergedContextConfiguration

  • getLocations
    Get the merged resource locations for ApplicationContextconfiguration files for the #getTestClass().
  • getTestClass
    Get the Class associated with this MergedContextConfiguration.
  • getActiveProfiles
    Get the merged active bean definition profiles for the #getTestClass().
  • getClasses
    Get the merged annotated classes for the #getTestClass().
  • getContextLoader
    Get the resolved ContextLoader for the #getTestClass().
  • <init>
    Create a new MergedContextConfiguration instance by copying all fields from the supplied MergedConte
  • getParent
    Get the MergedContextConfiguration for the parent application context in a context hierarchy.
  • getParentApplicationContext
    Get the parent ApplicationContext for the context defined by this MergedContextConfiguration from th
  • getContextInitializerClasses
    Get the merged ApplicationContextInitializer classes for the #getTestClass().
  • getPropertySourceProperties
    Get the merged test PropertySource properties for the #getTestClass().Properties will be loaded into
  • hasLocations
    Determine if this MergedContextConfiguration instance has path-based context resource locations.
  • getPropertySourceLocations
    Get the merged resource locations for test PropertySourcesfor the #getTestClass().
  • hasLocations,
  • getPropertySourceLocations,
  • hasClasses,
  • hashCode,
  • equals,
  • nullSafeClassName,
  • processActiveProfiles,
  • processClasses,
  • processContextCustomizers

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now