Java Code Examples for org.springframework.beans.CachedIntrospectionResults

The following examples show how to use org.springframework.beans.CachedIntrospectionResults. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: spring-javaformat   Source File: SpringApplication.java    License: Apache License 2.0 5 votes vote down vote up
private void configureIgnoreBeanInfo(ConfigurableEnvironment environment) {
	if (System.getProperty(
			CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME) == null) {
		Boolean ignore = environment.getProperty("spring.beaninfo.ignore",
				Boolean.class, Boolean.TRUE);
		System.setProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME,
				ignore.toString());
	}
}
 
Example 2
/**
 * Reset all caches.
 */
public static void reset() {
    resetTypeVariableCache();
    resetAnnotationUtilsCache();
    resetReflectionUtilsCache();
    resetResolvableTypeCache();
    resetPropetyCache();
    CachedIntrospectionResults.clearClassLoader(ResetSpringStaticCaches.class.getClassLoader());
}
 
Example 3
@Override
public void runBare() throws Throwable {
  testContextManager.prepareTestInstance(this); // this will initialize all dependencies
  try {
    super.runBare();
  }
  finally {
    testContextManager.afterTestClass();
    applicationContext.close();
    applicationContext = null;
    processEngine = null;
    testContextManager = null;
    CachedIntrospectionResults.clearClassLoader(getClass().getClassLoader());
  }
}
 
Example 4
Source Project: spring-analysis-note   Source File: IntrospectorCleanupListener.java    License: MIT License 4 votes vote down vote up
@Override
public void contextInitialized(ServletContextEvent event) {
	CachedIntrospectionResults.acceptClassLoader(Thread.currentThread().getContextClassLoader());
}
 
Example 5
Source Project: spring-analysis-note   Source File: IntrospectorCleanupListener.java    License: MIT License 4 votes vote down vote up
@Override
public void contextDestroyed(ServletContextEvent event) {
	CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
	Introspector.flushCaches();
}
 
Example 6
@Override
public void contextInitialized(ServletContextEvent event) {
	CachedIntrospectionResults.acceptClassLoader(Thread.currentThread().getContextClassLoader());
}
 
Example 7
@Override
public void contextDestroyed(ServletContextEvent event) {
	CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
	Introspector.flushCaches();
}
 
Example 8
@Override
public void contextInitialized(ServletContextEvent event) {
	CachedIntrospectionResults.acceptClassLoader(Thread.currentThread().getContextClassLoader());
}
 
Example 9
@Override
public void contextDestroyed(ServletContextEvent event) {
	CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
	Introspector.flushCaches();
}
 
Example 10
@Override
public void contextInitialized(ServletContextEvent event) {
	CachedIntrospectionResults.acceptClassLoader(Thread.currentThread().getContextClassLoader());
}
 
Example 11
@Override
public void contextDestroyed(ServletContextEvent event) {
	CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
	Introspector.flushCaches();
}
 
Example 12
Source Project: spring-analysis-note   Source File: AbstractApplicationContext.java    License: MIT License 3 votes vote down vote up
/**
 * Reset Spring's common reflection metadata caches, in particular the
 * {@link ReflectionUtils}, {@link AnnotationUtils}, {@link ResolvableType}
 * and {@link CachedIntrospectionResults} caches.
 * @since 4.2
 * @see ReflectionUtils#clearCache()
 * @see AnnotationUtils#clearCache()
 * @see ResolvableType#clearCache()
 * @see CachedIntrospectionResults#clearClassLoader(ClassLoader)
 */
protected void resetCommonCaches() {
	ReflectionUtils.clearCache();
	AnnotationUtils.clearCache();
	ResolvableType.clearCache();
	CachedIntrospectionResults.clearClassLoader(getClassLoader());
}
 
Example 13
Source Project: java-technology-stack   Source File: AbstractApplicationContext.java    License: MIT License 3 votes vote down vote up
/**
 * Reset Spring's common reflection metadata caches, in particular the
 * {@link ReflectionUtils}, {@link AnnotationUtils}, {@link ResolvableType}
 * and {@link CachedIntrospectionResults} caches.
 * @since 4.2
 * @see ReflectionUtils#clearCache()
 * @see AnnotationUtils#clearCache()
 * @see ResolvableType#clearCache()
 * @see CachedIntrospectionResults#clearClassLoader(ClassLoader)
 */
protected void resetCommonCaches() {
	ReflectionUtils.clearCache();
	AnnotationUtils.clearCache();
	ResolvableType.clearCache();
	CachedIntrospectionResults.clearClassLoader(getClassLoader());
}
 
Example 14
/**
 * Reset Spring's common core caches, in particular the {@link ReflectionUtils},
 * {@link ResolvableType} and {@link CachedIntrospectionResults} caches.
 * @since 4.2
 * @see ReflectionUtils#clearCache()
 * @see ResolvableType#clearCache()
 * @see CachedIntrospectionResults#clearClassLoader(ClassLoader)
 */
protected void resetCommonCaches() {
	ReflectionUtils.clearCache();
	ResolvableType.clearCache();
	CachedIntrospectionResults.clearClassLoader(getClassLoader());
}
 
Example 15
/**
 * Reset Spring's common core caches, in particular the {@link ReflectionUtils},
 * {@link ResolvableType} and {@link CachedIntrospectionResults} caches.
 * @since 4.2
 * @see ReflectionUtils#clearCache()
 * @see ResolvableType#clearCache()
 * @see CachedIntrospectionResults#clearClassLoader(ClassLoader)
 */
protected void resetCommonCaches() {
	ReflectionUtils.clearCache();
	ResolvableType.clearCache();
	CachedIntrospectionResults.clearClassLoader(getClassLoader());
}