I'm using jersey more every time I run the error: 404 in apache tom-cat.
package br.com.gomes.LojaDeVendas.util;
import javax.ws.rs.ApplicationPath;
// chamando o pacote do service
import org.glassfish.jersey.server.ResourceConfig;
@ApplicationPath("rest")
public class LojaDeVendasResourceConfig extends ResourceConfig{
public LojaDeVendasResourceConfig(){
packages("br.com.gomes.LojaDeVendas.service");
}
}
//chamado o conteiner para retorna a resposta abaixo no browser
package br.com.gomes.LojaDeVendas.service;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
// http://localhost:8080/LojaDeVendas/rest/vendas
@Path("vendas")
public class LojaDeVendasService {
@GET
public String exibir() {
return "Curso de Java";
}
}