diff --git a/src/main/java/com/example/jerseyexercise/resources/GoldenWeekRest.java b/src/main/java/com/example/jerseyexercise/resources/GoldenWeekRest.java new file mode 100644 index 0000000..0d2fa8a --- /dev/null +++ b/src/main/java/com/example/jerseyexercise/resources/GoldenWeekRest.java @@ -0,0 +1,25 @@ +package com.example.jerseyexercise.resources; + +import org.springframework.stereotype.Component; + +import javax.ws.rs.*; +import javax.ws.rs.core.*; + +@Path("/GoldenWeek") +@Component +public class GoldenWeekRest { + private String words = "Golden Week is fuck."; + + @GET + @Produces(MediaType.TEXT_PLAIN) + public String getMessage() { + return words; + } + + @PUT + @Produces(MediaType.TEXT_PLAIN) + public String setMessage(@FormParam("message") String w) { + words = w; + return "Success!!"; + } +}