use of org.apache.meecrowave.configuration.Configuration in project meecrowave by apache.
the class MeecrowaveTest method classpathUsingConfigurationAndNotBuilder.
@Test
public void classpathUsingConfigurationAndNotBuilder() {
final Meecrowave.Builder randomPortHolder = new Meecrowave.Builder().randomHttpPort();
final Configuration configuration = new Configuration();
configuration.setHttpPort(randomPortHolder.getHttpPort());
configuration.setScanningPackageIncludes("org.superbiz.app");
try (final Meecrowave meecrowave = new Meecrowave(new Configuration()).bake()) {
assertClasspath(meecrowave);
} catch (final IOException e) {
fail(e.getMessage());
}
}
use of org.apache.meecrowave.configuration.Configuration in project meecrowave by apache.
the class OWBTomcatWebScannerService method setFilter.
// replace init
public void setFilter(final JarScanFilter filter, final ServletContext ctx) {
this.filter = filter;
super.init(ctx);
final Configuration config = Configuration.class.cast(ServletContext.class.cast(ctx).getAttribute("meecrowave.configuration"));
if (this.filter == null) {
this.filter = new KnownJarsFilter(config);
}
final Filter userFilter = webBeansContext().getService(Filter.class);
if (KnownClassesFilter.class.isInstance(userFilter)) {
KnownClassesFilter.class.cast(userFilter).init(config);
}
}
Aggregations