• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CachedIntrospectionResults类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.beans.CachedIntrospectionResults的典型用法代码示例。如果您正苦于以下问题:Java CachedIntrospectionResults类的具体用法?Java CachedIntrospectionResults怎么用?Java CachedIntrospectionResults使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CachedIntrospectionResults类属于org.springframework.beans包,在下文中一共展示了CachedIntrospectionResults类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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());
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:17,代码来源:SpringProcessEngineTestCase.java


示例2: initJavaBeansCache

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
private void initJavaBeansCache() {
    Class<?>[] classes =
            new Class<?>[] { OsgiServiceFactoryBean.class, OsgiServiceProxyFactoryBean.class,
                    OsgiServiceCollectionProxyFactoryBean.class };

    CachedIntrospectionResults.acceptClassLoader(OsgiStringUtils.class.getClassLoader());

    for (Class<?> clazz : classes) {
        BeanUtils.getPropertyDescriptors(clazz);
    }
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:12,代码来源:JavaBeansCacheActivator.java


示例3: configureIgnoreBeanInfo

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
private void configureIgnoreBeanInfo(ConfigurableEnvironment environment) {
	if (System.getProperty(
			CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME) == null) {
		RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(environment,
				"spring.beaninfo.");
		Boolean ignore = resolver.getProperty("ignore", Boolean.class, Boolean.TRUE);
		System.setProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME,
				ignore.toString());
	}
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:ConfigFileApplicationListener.java


示例4: cleanup

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
@After
public void cleanup() {
	if (this.context != null) {
		this.context.close();
	}
	System.clearProperty("the.property");
	System.clearProperty("spring.config.location");
	System.clearProperty("spring.main.banner-mode");
	System.clearProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:ConfigFileApplicationListenerTests.java


示例5: setIgnoreBeanInfoPropertyByDefault

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
@Test
public void setIgnoreBeanInfoPropertyByDefault() throws Exception {
	this.initializer.setSearchNames("testproperties");
	this.initializer.postProcessEnvironment(this.environment, this.application);
	String property = System
			.getProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME);
	assertThat(property).isEqualTo("true");
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:ConfigFileApplicationListenerTests.java


示例6: disableIgnoreBeanInfoProperty

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
@Test
public void disableIgnoreBeanInfoProperty() throws Exception {
	this.initializer.setSearchNames("testproperties");
	TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.environment,
			"spring.beaninfo.ignore=false");
	this.initializer.postProcessEnvironment(this.environment, this.application);
	String property = System
			.getProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME);
	assertThat(property).isEqualTo("false");
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:ConfigFileApplicationListenerTests.java


示例7: cleanupKnownCaches

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
private void cleanupKnownCaches() throws Exception {
	// Whilst not strictly necessary it helps to cleanup soft reference caches
	// early rather than waiting for memory limits to be reached
	clear(ResolvableType.class, "cache");
	clear("org.springframework.core.SerializableTypeWrapper", "cache");
	clear(CachedIntrospectionResults.class, "acceptedClassLoaders");
	clear(CachedIntrospectionResults.class, "strongClassCache");
	clear(CachedIntrospectionResults.class, "softClassCache");
	clear(ReflectionUtils.class, "declaredFieldsCache");
	clear(ReflectionUtils.class, "declaredMethodsCache");
	clear(AnnotationUtils.class, "findAnnotationCache");
	clear(AnnotationUtils.class, "annotatedInterfaceCache");
	clear("com.sun.naming.internal.ResourceManager", "propertiesCache");
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:15,代码来源:Restarter.java


示例8: reset

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
/**
 * Reset all caches.
 */
public static void reset() {
    resetTypeVariableCache();
    resetAnnotationUtilsCache();
    resetReflectionUtilsCache();
    resetPropetyCache();
    CachedIntrospectionResults.clearClassLoader(ResetSpringStaticCaches.class.getClassLoader());
}
 
开发者ID:HotswapProjects,项目名称:HotswapAgent,代码行数:11,代码来源:ResetSpringStaticCaches.java


示例9: destroyJavaBeansCache

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
private void destroyJavaBeansCache() {
    CachedIntrospectionResults.clearClassLoader(OsgiStringUtils.class.getClassLoader());
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:4,代码来源:JavaBeansCacheActivator.java


示例10: contextInitialized

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
@Override
public void contextInitialized(ServletContextEvent event) {
	CachedIntrospectionResults.acceptClassLoader(Thread.currentThread().getContextClassLoader());
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:IntrospectorCleanupListener.java


示例11: contextDestroyed

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
@Override
public void contextDestroyed(ServletContextEvent event) {
	CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
	Introspector.flushCaches();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:6,代码来源:IntrospectorCleanupListener.java


示例12: 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();
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:7,代码来源:XBeanBrokerService.java


示例13: contextInitialized

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
public void contextInitialized(ServletContextEvent event) {
	CachedIntrospectionResults.acceptClassLoader(Thread.currentThread().getContextClassLoader());
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:4,代码来源:IntrospectorCleanupListener.java


示例14: contextDestroyed

import org.springframework.beans.CachedIntrospectionResults; //导入依赖的package包/类
public void contextDestroyed(ServletContextEvent event) {
	CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader());
	Introspector.flushCaches();
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:5,代码来源:IntrospectorCleanupListener.java


示例15: 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());
	}
}
 
开发者ID:techtrip,项目名称:dynamicbeanloader,代码行数:58,代码来源:DynamicBeanController.java


示例16: 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());
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:14,代码来源:AbstractApplicationContext.java



注:本文中的org.springframework.beans.CachedIntrospectionResults类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LoginEvent类代码示例发布时间:2022-05-22
下一篇:
Java JointType类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap