This repository was archived by the owner on May 28, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
core-server/src/main/java/org/glassfish/jersey/server Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 5151import java .util .logging .Level ;
5252import java .util .logging .Logger ;
5353
54+ import javax .ws .rs .Path ;
5455import javax .ws .rs .RuntimeType ;
5556import javax .ws .rs .core .Application ;
5657import javax .ws .rs .core .Configurable ;
@@ -646,6 +647,9 @@ public final ResourceConfig setClassLoader(final ClassLoader classLoader) {
646647 /**
647648 * Adds array of package names which will be used to scan for components.
648649 * <p/>
650+ * Package scanning ignores inheritance and therefore {@link Path} annotation
651+ * on parent classes and interfaces will be ignored.
652+ * <p/>
649653 * Packages will be scanned recursively, including all nested packages.
650654 *
651655 * @param packages array of package names.
@@ -658,7 +662,10 @@ public final ResourceConfig packages(final String... packages) {
658662
659663 /**
660664 * Adds array of package names which will be used to scan for components.
661- *
665+ * <p/>
666+ * Package scanning ignores an inheritance and therefore {@link Path} annotation
667+ * on parent classes and interfaces will be ignored.
668+ * <p/>
662669 * @param recursive defines whether any nested packages in the collection of specified
663670 * package names should be recursively scanned (value of {@code true})
664671 * as part of the package scanning or not (value of {@code false}).
Original file line number Diff line number Diff line change 101101 <literal >getClasses</literal >. For example, the following application class that extends from
102102 &lit.jersey.server.ResourceConfig; scans during deployment for JAX-RS components in packages
103103 <literal >org.foo.rest</literal > and <literal >org.bar.rest</literal >:
104-
104+ <note >
105+ <para >
106+ <emphasis >Package scanning</emphasis > ignores an inheritance and therefore &lit.jaxrs.Path; annotation
107+ on parent classes and interfaces will be ignored. These classes won't be registered as the JAX-RS component
108+ classes.
109+ </para >
110+ </note >
105111 <example >
106112 <title >Reusing Jersey implementation in your custom application model</title >
107113 <programlisting language =" java" linenumbering =" numbered" >public class MyApplication extends ResourceConfig {
You can’t perform that action at this time.
0 commit comments