diff --git a/src/main/java/com/ntlab/irisserver/resources/KeywordsRest.java b/src/main/java/com/ntlab/irisserver/resources/KeywordsRest.java new file mode 100644 index 0000000..3bdc387 --- /dev/null +++ b/src/main/java/com/ntlab/irisserver/resources/KeywordsRest.java @@ -0,0 +1,27 @@ +package com.ntlab.irisserver.resources; + +import org.springframework.stereotype.Component; +import com.ntlab.irisserver.models.KeywordManager; + + +import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + + +@Component +@Path("/keywords") + +public class KeywordsRest { + + @GET + @Produces(MediaType.APPLICATION_JSON) + public String[] getKeywords(){ + KeywordManager km = KeywordManager.getInstance(); + String[] keywords = km.getKeywords(); + + return keywords; + } + + +}