, " ". , packages("some.package.to.scan") ResourceConfig.
, , Spring . config.packages():
ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);
scanner.addIncludeFilter(new AnnotationTypeFilter(Provider.class));
scanner.addIncludeFilter(new AnnotationTypeFilter(Path.class));
config.registerClasses(scanner.findCandidateComponents("your.package.to.scan").stream()
.map(beanDefinition -> ClassUtils.resolveClassName(beanDefinition.getBeanClassName(), config.getClassLoader()))
.collect(Collectors.toSet()));
. , org.glassfish.jersey.server.internal.scanning.AnnotationAcceptingListener. , , : , @Path @Provider ( - - ).
(Using the old version of the download plugin also worked for me, but I tried to avoid this.)
source
share