Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #38346

Re: i want to be write below code in Service API with Jax-rs Restful

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 2018-06-05 21:21 -0400
Organization Aioe.org NNTP Server
Message-ID <pf7cut$52b$1@gioia.aioe.org> (permalink)
References <8c24dddd-9932-450c-a26b-6b70885e64a3@googlegroups.com>

Show all headers | 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


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