Skip to content

Commit

Permalink
fix: add the application/json
Browse files Browse the repository at this point in the history
  • Loading branch information
Similarityoung committed Nov 6, 2024
1 parent 8fb7b28 commit 311a48f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@
package org.apache.dubbo.samples.spi.protocol.rest.api;


import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/demo")
public interface DemoService {
@POST
@Path("/sayHello")
public String sayHello(String name);
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
String sayHello(String name);
}

0 comments on commit 311a48f

Please sign in to comment.