samedi 14 mars 2015

how to send static contend in json response using maven?

I am trying to make static web service which is used by other like mobile developer .I need to make first static data like that



{"name":"shruti"}


so I start googling and find the editor or tutorial .First I download editor form here .http://ift.tt/1h67xYN make my first program .i am using same inbuilt server Pivotal tc Server Developer Edition v3.1-config my porm.xml look like this porm.xml



<project xmlns="http://ift.tt/IH78KX" xmlns:xsi="http://ift.tt/ra1lAU"
xsi:schemaLocation="http://ift.tt/IH78KX http://ift.tt/HBk9RF">
<modelVersion>4.0.0</modelVersion>
<groupId>test1</groupId>
<artifactId>test1</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>test1 Maven Webapp</name>
<url>http://ift.tt/19pvvEY;
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>

</dependencies>
<build>
<finalName>test1</finalName>
</build>
</project>


what are dependancy i need to add in my poem.xml file so that when i hit url localhost:test it give json response {"name":"shruti"}


Aucun commentaire:

Enregistrer un commentaire