RESTEasy maven使用
添加依赖:
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.1.3.Final</version>
</dependency>
springboot resteasy
@Api("SwaggerUiContraller")
@Path("/swaggerUi")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@Component
public class SwaggerUiContraller {
@POST
@ApiOperation("getUser")
@Path("/getUser")
public String getUser() {
return "zhangxiongfeng";
}
}