package com.example.jerseyexercise.resources; import org.springframework.stereotype.Component; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; @Path("/Matsui") @Component public class MatsuiRest { private String message = "Matsui no rest desu."; @GET @Produces(MediaType.TEXT_PLAIN) public String getMessage() { return message; } @PUT @Produces(MediaType.TEXT_PLAIN) public String setMessage(@FormParam("message") String m) { message = m; return "Success!!"; } }