当前位置: 首页>>代码示例>>Java>>正文


Java CachedIntrospectionResults类代码示例

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


CachedIntrospectionResults类属于org.springframework.beans包,在下文中一共展示了CachedIntrospectionResults类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


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