package de.seven.fate.rest;

import de.seven.fate.message.resource.MessageResource;

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

@ApplicationPath("/rest")
public class RestApplication extends Application {

    private static final Set<Class<?>> classSet = new HashSet<Class<?>>(Arrays.asList(MessageResource.class));

    @Override
    public Set<Class<?>> getClasses() {
        return classSet;
    }
}
package de.seven.fate.rest;

import de.seven.fate.message.resource.MessageResource;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.stereotype.Component;

import javax.ws.rs.ApplicationPath;

@Component
@ApplicationPath("/rest")
public class RestApplication extends ResourceConfig {

    public RestApplication() {
        // Packages to be scanned for REST annotations
        register(MessageResource.class);
    }
}
Add REST (fix test)