I was able to extract the properties from an application.properties file. But I was unable to use it in another class.

**ConfigFile**

```
package com.springweb.springApplication.config;    
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;    

@Component
public class AppConfig {

private final String App;    
private final String servers;    

@Autowired
public AppConfig(@Value("${Application}") String App,
                @Value("${APP_SERVERS}") String servers) {
    this.App = App;
    this.servers = servers;

    System.out.println("================ " + servers + "================ ");
}    

public String getApp() {
    return App;
}

public String getServers() {
    return servers;
}

}

```

**Class code SNippet**

```
public class MyFirstClass{

private String RED = "RED";
private String GREEN = "GREEN";
private String YELLOW = "YELLOW";   

public List<ModelSet> findall() {

    Properties prop = new Properties();
    InputStream input = null;

            try {
                input = new
                FileInputStream("C:/Users/Jackie/workspace/springApplication/lib/myConfig.properties");
                prop.load(input);
            } catch (FileNotFoundException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }                           

        String servers = prop.getProperty("APP_SERVERS");
        String Application = prop.getProperty("Application");
}

```

I want to replace inputSteam and use the properties file internally. Instead of having stream to find the file. I want to get those variables from the config file. I tried looking at <http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html> but I could not find how to call the variables into another class. I only have a slightest clue on how to apporach this. Right now I believe I have to do something like .getproperty or env properties.