package algoLike.pull; import org.springframework.stereotype.Component; import pushPullRefactor.Getter; import pushPullRefactor.Resource; import pushPullRefactor.State; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; @Path("/guessA") @Component @Resource("guessA") public class GuessA { @State private int value = 0; @PUT public void setGuessA(@FormParam("a") int a) { this.value = a; } @Produces(MediaType.APPLICATION_JSON) @GET @Getter public int getValue() { return value; } }