How can I use Value Annotations in another class?
<p>How can I get my value here and use it in another class? I wanted to create a class that handles all the @Value annotations then the other classes can get those values from this class. I will change from a main class to a new class once I learn how to get the values from another class</p>

<p><strong>How can I get these variables</strong></p>

<pre><code>@Configuration
@ComponentScan
@EnableAutoConfiguration
public  class WebProperties {

       @Value("${Application}")
        private String app;      
        @Value("${APP_MEMORY_GREP_FOLDERS_APP}")
        private String appFolder;        
        @Value("${APP_MEMORY_GREP_FOLDERS_OPT}")
        private String optFolder;
      //getters and setters
}}
</code></pre>

<p><strong>To print into the main class</strong></p>

<pre><code>@Configuration
@ComponentScan
@EnableAutoConfiguration
public class Application {

    @Value("${Application}")
    private String app;

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @PostConstruct
    public void postConstruct() {
        System.out.print("SampleApplication started: " + app);
    }
}
</code></pre>

<p>Without having to call @Value all over again</p>