javax.ws.rs.core.Application provides one or more resources by overriding getClasses or getSingletons methods. We can skip overriding these methods, in that case the implementation can be used to only provide a root resource path by using @ApplicationPath. Also, in that case, the resources are discovered via classpath scanning for @Path and @Provider annotations.