org.jboss.weld.environment.se.Weld.setClassLoader()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中org.jboss.weld.environment.se.Weld.setClassLoader()方法的一些代码示例,展示了Weld.setClassLoader()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Weld.setClassLoader()方法的具体详情如下:
包路径:org.jboss.weld.environment.se.Weld
类名称:Weld
方法名:setClassLoader

Weld.setClassLoader介绍

[英]Set a ClassLoader. The given ClassLoader will be scanned automatically for bean archives if scanning is enabled.
[中]设置一个类加载器。如果启用扫描,给定的类加载器将自动扫描bean存档。

代码示例

代码示例来源:origin: io.squark.yggdrasil/yggdrasil-cdi-provider

@Override
public void provide(YggdrasilConfiguration configuration) throws YggdrasilException {
  logger.info("Initializing Weld container...");
  System.setProperty("org.jboss.logging.provider", "slf4j");
  Weld weld = new Weld();
  weld.setClassLoader(CDIProvider.class.getClassLoader());
  WeldContainer container = weld.initialize();
  YggdrasilContext.registerObject(BeanManager.class.getName(), container.getBeanManager());
  logger.info(CDIProvider.class.getSimpleName() + " initialized.");
}

代码示例来源:origin: io.squark.yggdrasil.yggdrasil-framework-provider/yggdrasil-cdi-provider

@Override
public void provide(YggdrasilConfiguration configuration) throws YggdrasilException {
  logger.info("Initializing Weld container...");
  System.setProperty("org.jboss.logging.provider", "slf4j");
  Weld weld = new Weld();
  weld.property(Weld.ARCHIVE_ISOLATION_SYSTEM_PROPERTY, false);
  weld.setClassLoader(CDIProvider.class.getClassLoader());
  WeldContainer container = weld.initialize();
  YggdrasilContext.registerObject(BeanManager.class.getName(), container.getBeanManager());
  logger.info(CDIProvider.class.getSimpleName() + " initialized.");
}

代码示例来源:origin: jbosstm/narayana

.disableDiscovery()
.addExtensions(LraAnnotationProcessingExtension.class)
.setClassLoader(classLoader)
.addBeanClasses(clazzNames.toArray(new Class[clazzNames.size()]));

代码示例来源:origin: io.thorntail/container

weld.setClassLoader(module.getClassLoader());

代码示例来源:origin: thorntail/thorntail

weld.setClassLoader(module.getClassLoader());

代码示例来源:origin: org.wildfly.swarm/container

weld.setClassLoader(module.getClassLoader());

相关文章