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 51
51
import java .util .logging .Level ;
52
52
import java .util .logging .Logger ;
53
53
54
+ import javax .ws .rs .Path ;
54
55
import javax .ws .rs .RuntimeType ;
55
56
import javax .ws .rs .core .Application ;
56
57
import javax .ws .rs .core .Configurable ;
@@ -646,6 +647,9 @@ public final ResourceConfig setClassLoader(final ClassLoader classLoader) {
646
647
/**
647
648
* Adds array of package names which will be used to scan for components.
648
649
* <p/>
650
+ * Package scanning ignores inheritance and therefore {@link Path} annotation
651
+ * on parent classes and interfaces will be ignored.
652
+ * <p/>
649
653
* Packages will be scanned recursively, including all nested packages.
650
654
*
651
655
* @param packages array of package names.
@@ -658,7 +662,10 @@ public final ResourceConfig packages(final String... packages) {
658
662
659
663
/**
660
664
* 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/>
662
669
* @param recursive defines whether any nested packages in the collection of specified
663
670
* package names should be recursively scanned (value of {@code true})
664
671
* as part of the package scanning or not (value of {@code false}).
Original file line number Diff line number Diff line change 101
101
<literal >getClasses</literal >. For example, the following application class that extends from
102
102
&lit.jersey.server.ResourceConfig; scans during deployment for JAX-RS components in packages
103
103
<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 >
105
111
<example >
106
112
<title >Reusing Jersey implementation in your custom application model</title >
107
113
<programlisting language =" java" linenumbering =" numbered" >public class MyApplication extends ResourceConfig {
You can’t perform that action at this time.
0 commit comments