Hi All,
I have this class:
package home;
import home.resource.TeacherResource;
import home.resource.WordResource;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
import java.util.HashSet;
import java.util.Set;
@ApplicationPath("/resource")
public class MyApplication extends Application {
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<>();
classes.add(WordResource.class);
// classes.add(TeacherResource.class);
return classes;
}
}
In the getClasses method above, if I add only 1 class (any of them) to the Set
classes, it works. If I add both of them, the WordResource.class doesn't
work. Does anybody know what my problem is?
Thanks.
PS: the application can be found at https://github.com/dxxvi/tomee-jaxrs