public class FirstRest2 extends ServerResource {
public static void main(String[] args) throws Exception {
// Create the HTTP server and listen on port 8182
new Server(Protocol.HTTP, 8185, FirstRest2.class).start();
}
@Get
public String toString(){
return "hello, world";
}
}
restlet2继承serverResource不是1.0版本的resource,put,get,delete,post采用annotation标识,采用pojo方式,降低藕合度,运行例子时添加jar文件只需要添加org.restlet.jar,如果添加所有restlet的lib中的jar文件将的报未找到文件错误,不知什么原因。
分享到:
相关推荐
Spring3MVC-REST-HelloWorld 实例简单代码
基于 Spring REST framework 开发的HelloWorld
JAX-RS REST helloworld 项目源码 下载后引入eclipse jee 启动tomcat可直接访问 访问路径为http://localhost:8080/AndroidJAX-RS/jaxrs/helloworld/html
NULL 博文链接:https://jinnianshilongnian.iteye.com/blog/1997192
HelloWorld:带有REST的基本Hello World
java -Xms1024m -Xmx1024m -XX:NewRatio=3 -XX:SurvivorRatio=6 -Dspring.config.location=classpath:application-config.yaml,classpath:application-secret.yaml -jar spring-rest-helloworld.jar
你好世界休息 Springboot Hello World REST服务
spring boot hello world rest
Spring3.1.2+Mybatis3.1.1+Restlet2.0.1框架HelloWorld实例(Maven) maven package生成后打包war部署到tomacat测试: http://localhost:8080/oa/rest/hello 数据库为postgresql 9.2,单元测试中有mybatis的数据库...
Jersey-Rest-Hello-World 使用这个 ..和这个教程。 在远程 Tomcat 7 和本地 Tomcat8(Oracle JDK 1.7 和 1.8)上工作堆空间设置为 -Xmx256m这个怎么运作: 网页.xml: <init><param>javax.ws.rs.Application</param>...
休息世界 这是使用球衣框架的世界示例。 这独立于IDE,您可以使用ant来构建项目并进行部署。
Hello World Rest 使用 Apache Cxf 和 Spring Framework
Hello World Rest API 主类com.in28minutes.rest.webservices.restfulwebservices.RestfulWebServicesApplication 您无法将此应用配置为在端口80上运行,因此无法在本地运行该应用-https: 。 您可以将其作为docker...
组件HelloWorld应用程序由两部分组成,都用JavaScript编写客户端-客户端负责创建和签名事务,将这些事务组合为批处理,然后通过REST-API模块将其提交给验证程序。 在HelloWorld应用程序中,客户端是一个Node.js应用...
该资源是java restful的应用框架resteasy---实现了jax-rs规范的一个demo,如有疑问请联系caizhh2009@gmail.com
Topera的Hello World#002带有Maven的Rest Server(使用JAX-RS) 你好,世界是一个Rest Server测试方法$ cd maven-rest-server-jaxrs $ mvn软件包从./target获取生成的战争并进行部署。 此示例配置为在JBoss中的“ /...
$ docker build -t friboo-hello-world . $ docker run -it -p 8080:8080 friboo-hello-world 试用定义的API和验证: $ curl http://localhost:8080/hello/stranger # will return HTTP code 200 $ curl ...
hello-rest-platform-eval:使用“ hello world”简单api进行平台性能的负载测试评估
struts2.1.6 convertion插件(即注释方式配置)的helloworld 默认调用index()方法 文档说明用struts.xml中标签设置值,好象不用也行 rest插件例子 默认调用 create()方法 struts2.1.6 vistor校验例子 都是我测试例子,...
Hello World Rest API 运行应用程序 作为Java应用程序运行com.pk.rest.webservices.restfulwebservices.RestfulWebServicesApplication。 Hello World V1 abcde { " message " : " Hello World " } { " message " :...