title: Spring boot, how to read particular object from json file, what annotation do I need?
body: <p>I'm studying Spring Boot and I know how to read JSON file from resources directory but I want to get particular data, not whole data.
  like localhost:8080/user returns user name.</p>
  
  <p>below is my current code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>package com.example;
  
  
  import org.springframework.beans.factory.annotation.Value;
  import org.springframework.boot.*;
  import org.springframework.boot.autoconfigure.*;
  import org.springframework.core.io.Resource;
  import org.springframework.web.bind.annotation.*;
  
  
  
  @RestController
  @EnableAutoConfiguration
  public class HelloWorld {
  
      @Value("classpath:json/test.json")
      private Resource resourceFile;
      @RequestMapping("/")
      Resource home() {
          return resourceFile;
      }
  
  
      public static void main(String[] args) throws Exception {
          SpringApplication.run(HelloWorld.class, args);
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want to read particular data in the test.json file. please give me some advice or steps. Thanks</p>