Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #38346
| Path | csiph.com!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Arne Vajhøj <arne@vajhoej.dk> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: i want to be write below code in Service API with Jax-rs Restful |
| Date | Tue, 5 Jun 2018 21:21:35 -0400 |
| Organization | Aioe.org NNTP Server |
| Lines | 17 |
| Message-ID | <pf7cut$52b$1@gioia.aioe.org> (permalink) |
| References | <8c24dddd-9932-450c-a26b-6b70885e64a3@googlegroups.com> |
| NNTP-Posting-Host | PBuS014lhzVyHjLbXmo/ZQ.user.gioia.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
| X-Notice | Filtered by postfilter v. 0.8.3 |
| Content-Language | en-US |
| Xref | csiph.com comp.lang.java.programmer:38346 |
Show key headers only | View raw
On 6/5/2018 5:56 AM, siddareddy.moolam@gmail.com wrote:
> code:
> MongoClient client = new MongoClient("localhost", 27017);
> MongoDatabase database = client.getDatabase("admin");
> MongoCollection<Document> collection = database
> .getCollection("command");
>
> Object id = new ObjectId("5b16371c425750918ebf1454");
> Document newCmd = new Document("d", 4);
> collection.updateOne(Filters.eq("_id", id), Updates.addToSet("cmd", newCmd));
So you write a JAX-RS service class with a @Path annotation
and an update method with a @Post or @Put annotation.
Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
i want to be write below code in Service API with Jax-rs Restful siddareddy.moolam@gmail.com - 2018-06-05 02:56 -0700 Re: i want to be write below code in Service API with Jax-rs Restful Arne Vajhøj <arne@vajhoej.dk> - 2018-06-05 21:21 -0400
csiph-web