REST how to pass empty path parameter?

后端 未结 2 1066
刺人心
刺人心 2021-02-05 13:12

I\'m building REST web app using Netbean 7.1.1 Glassfish 3.1.2

I have 2 URL:

\"http://myPage/resource/getall/name\"  (get some          


        
2条回答
  •  萌比男神i
    2021-02-05 14:00

    @GET
    @Path("getall{name:(/[^/]+?)?}")
    @Produces("application/json")
    public Object Getall(@PathParam("name") String customerName) {
      //here I want to call SQL if customerName is not null. is it      
    
     possible??? 
      }
    

提交回复
热议问题