Error 404 while running jersey on apache tom-cat

Asked

Viewed 38 times

0

I’m using jersey more every time I run 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";
    }
}

1 answer

0

Staff was badly do not need to answer already found the problem http address:localhos:8080/Sales/Rest/sales at the Sales place I typed Lojadevendas and that’s where I went wrong, the code is already working correctly

Browser other questions tagged

You are not signed in. Login or sign up in order to post.