本文整理汇总了Java中org.springframework.beans.CachedIntrospectionResults.clearClassLoader方法的典型用法代码示例。如果您正苦于以下问题:Java CachedIntrospectionResults.clearClassLoader方法的具体用法?Java CachedIntrospectionResults.clearClassLoader怎么用?Java CachedIntrospectionResults.clearClassLoader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.beans.CachedIntrospectionResults
的用法示例。
在下文中一共展示了CachedIntrospectionResults.clearClassLoader方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: runBare
import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
@Override
public void runBare() throws Throwable {
testContextManager.prepareTestInstance(this); // this will initialize all dependencies
try {
super.runBare();
}
finally {
testContextManager.afterTestClass();
applicationContext.close();
clearTestContextCache(testContextManager);
applicationContext = null;
processEngine = null;
testContextManager = null;
CachedIntrospectionResults.clearClassLoader(getClass().getClassLoader());
}
}
示例2: reset
import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
/**
* Reset all caches.
*/
public static void reset() {
resetTypeVariableCache();
resetAnnotationUtilsCache();
resetReflectionUtilsCache();
resetPropetyCache();
CachedIntrospectionResults.clearClassLoader(ResetSpringStaticCaches.class.getClassLoader());
}
示例3: destroyJavaBeansCache
import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
private void destroyJavaBeansCache() {
CachedIntrospectionResults.clearClassLoader(OsgiStringUtils.class.getClassLoader());
}
示例4: contextDestroyed
import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
@Override
public void contextDestroyed(ServletContextEvent event) {
CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
Introspector.flushCaches();
}
示例5: stop
import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
@Override
public void stop() throws Exception {
// must clear this Spring cache to avoid any memory leaks
CachedIntrospectionResults.clearClassLoader(getClass().getClassLoader());
super.stop();
}
示例6: contextDestroyed
import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
public void contextDestroyed(ServletContextEvent event) {
CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
Introspector.flushCaches();
}
示例7: registerBean
import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
@RequestMapping(method = RequestMethod.GET, value = "/registerBean")
@ResponseBody
private String registerBean(
@RequestParam(value = "beanName", required = true) String beanName,
@RequestParam(value = "beanType", required = true) String beanType) {
try {
/* String demoMessage = getDemoMessage(); */
Class<?> c;
c = Class.forName(beanType);
CachedIntrospectionResults.clearClassLoader(c.getClassLoader());
beanFactory.registerBean(c, beanName, "prototype", false, true);
Object myBean = beanFactory.getBean(beanName);
String ret = PAGE_HEADER
+ SPRING_VERSION
+ BEAN_INFO_MSG
+ CLASSLOADER_DELAY
+ BEAN_INFO_HEADER
+ String.format(BEAN_INFO_FORMAT, beanName, myBean
.getClass().getName(), myBean.toString()) /*
* +
* DEMO_MESSAGE_HEADER
* +
* tagHTML(
* "p",
* demoMessage
* )
*/;
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(beanType);
}
/* CachedIntrospectionResults cir; */
/*
*
* if (ClassUtils.isCacheSafe(beanClass,
* CachedIntrospectionResults.class.getClassLoader()) ||
* isClassLoaderAccepted(beanClass.getClassLoader())) {
*/
// CachedIntrospectionResults.clearClassLoader(c.getClassLoader());
/* tripsDemo.getMessage(); */
return ret;
} catch (Exception e) {
return String
.format("Unable to create bean of type %s with the following error:</br>%s!",
beanType, e.getMessage());
}
}
示例8: resetCommonCaches
import org.springframework.beans.CachedIntrospectionResults; //导入方法依赖的package包/类
/**
* 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());
}