title: How can i use Request parameter in all methods whtout put in every method on java play framework?
body: <p>Im migragating a proyect from play 2.1.5 to 2.8.13 .</p>
  <p>When i want to get session documentation says that i should pass Request by paraemter, and for parse a json too</p>
  <p>session</p>
  <pre><code>public Result index(Http.Request request) {
    return request
        .session()
        .get(&quot;connected&quot;)
        .map(user -&gt; ok(&quot;Hello &quot; + user))
        .orElseGet(() -&gt; unauthorized(&quot;Oops, you are not connected&quot;));
  }
  </code></pre>
  <p>Json</p>
  <pre><code>public Result sayHello(Http.Request request) {
    JsonNode json = request.body().asJson();
    if (json == null) {
      return badRequest(&quot;Expecting Json data&quot;);
    } else {
      String name = json.findPath(&quot;name&quot;).textValue();
      if (name == null) {
        return badRequest(&quot;Missing parameter [name]&quot;);
      } else {
        return ok(&quot;Hello &quot; + name);
      }
    }
  }
  </code></pre>
  <p>i have at least 90 methods that use one of this cases.</p>
  <p>Exists some arquitecture pattern to help me avoid having to pass a Request parameter in all methods?</p>
  <p>Thanks!</p>