Created
September 16, 2015 02:10
-
-
Save rederlo/8150a05e494215c16f80 to your computer and use it in GitHub Desktop.
Example rest with json return
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.skel.api; | |
import java.util.ArrayList; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import br.com.skel.dao.ClientDao; | |
import br.com.skel.pojo.ClientPojo; | |
@Path("/client") | |
public class Client{ | |
/** | |
* | |
*/ | |
@GET | |
@Produces("application/json") | |
public ArrayList<ClientPojo> test(){ | |
ArrayList<ClientPojo> cli = new ClientDao().listAll(); | |
return cli; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment