Skip to content

Commit

Permalink
Exclude the application can't be constructed
Browse files Browse the repository at this point in the history
  • Loading branch information
jimma authored and asoldano committed Nov 20, 2017
1 parent 66cb569 commit 202e8f9
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -130,6 +130,11 @@ private void startDeploymentBus(final Deployment dep)
}

private static void createFromApplication(JAXRSDeploymentMetadata md, Class<?> appClazz, Bus bus, ClassLoader classLoader, boolean cdiDeployment) {
//TODO:filter the can't construct app; another app set can be added in spi jaxrsDA ?
//and add if (!appClazz.isAnnotationPresent(ApplicationPath.class) && !md.hasBootClasses()) check
if (ResourceUtils.findResourceConstructor(appClazz, false) == null) {
return;
}
ApplicationInfo providerApp = (ApplicationInfo)createSingletonInstance(appClazz, bus);
Application app = providerApp.getProvider();
JAXRSServerFactoryBean bean = ResourceUtils.createApplication(app, md.isIgnoreApplicationPath(), false);
Expand Down

0 comments on commit 202e8f9

Please sign in to comment.