Giter Site home page Giter Site logo

jersey-rest-demo's Introduction

jersey-rest-demo readme



测试1

http://localhost:8080/jersey-rest-demo/rest/hello

  • 返回 Hello Jersey

jersey-rest-demo 增删改查

工程地址:http://localhost:8080/jersey-rest-demo/ 源代码: 查找:

1. 直接访问

地址:http://localhost:8080/jersey-rest-demo/rest/contacts/

2. PostMan访问

地址:http://localhost:8080/jersey-rest-demo/rest/contacts/

新增:

1. 通过页面添加:

新增:http://localhost:8080/jersey-rest-demo/pages/new_contact.jsp

查询:http://localhost:8080/jersey-rest-demo/rest/contacts

2. 通过Chrome的插件PostMan

方法PUT 语法 http://localhost:8080/jersey-rest-demo/rest/contacts/ 链接http://localhost:8080/jersey-rest-demo/rest/contacts/abcHeader参数Content-Type : application/json请求的json { "id": "abc", "name": "123" }

修改:

1. 修改记录

方法PUT语法 http://localhost:8080/jersey-rest-demo/rest/contacts/ 链接http://localhost:8080/jersey-rest-demo/rest/contacts/abcHeader参数Content-Type : application/json请求的json{ "id": "abc", "name": "12345" }

2. 查看更新后的结果

方法 GET 语法 http://localhost:8080/jersey-rest-demo/rest/contacts/ 链接 http://localhost:8080/jersey-rest-demo/rest/contacts/abc Header参数 Accept : application/json 返回的json { "id": "abc", "name": "12345" }

删除:

1. 删除记录

方法DELETE语法 http://localhost:8080/jersey-rest-demo/rest/contacts/ 链接http://localhost:8080/jersey-rest-demo/rest/contacts/abcHeader参数Content-Type : application/json

2. 查看更新后的结果

方法 GET 语法 http://localhost:8080/jersey-rest-demo/rest/contacts/ 链接 http://localhost:8080/jersey-rest-demo/rest/contacts/abc Header参数 Accept : application/json

jersey-rest-demo's People

Contributors

coderdream avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.