Q: add directory to classpath in runtime In my current spring project, when I run the application, it's created a directory on the user's home directory where I store some configuration files (*.properties file). In my code, I refer to this file in that way:
private String getFilename() {
    return System.getProperty("user.home")+File.separator+".webapp"+File.separator+"webapp.preferences";
}

which allows me run the application in any operational system without change the code. I need add this directory to the classpath of the application, to allow me use the annotation PropertySource to access the properties stored in the file using either the method getproperty from Enviroment class or the Value annotation.
I using spring-boot, so the start point for the application it's that:
@Controller
@EnableJpaRepositories
@EnableAutoConfiguration
@ComponentScan(value="com.spring")
public class Application {

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

}

I also have classes WebAppInitializer, WebAppConfig and DispatcherConfig to store the configurations handled by the XML files web.xml and dispatcher-config.xml from spring. 
Anyone can tell if this is possible and hor to accomplish that?
UPDATE
Following the sugestions in the commentaries, I add to my project this bean:
@Bean
static PropertySourcesPlaceholderConfigurer property() throws Exception {
    PropertySourcesPlaceholderConfigurer propertyConfigurer = new PropertySourcesPlaceholderConfigurer();

    String filename = System.getProperty("user.home")+File.separator+".webapp"+File.separator+"webapp.preferences";
    File file = new File( filename );
    if(file.exists())
        propertyConfigurer.setLocation( new FileSystemResource( filename ) );
    else {
        if(file.mkdir()) {
            FileOutputStream fos = new FileOutputStream( filename );
            fos.close();
            propertyConfigurer.setLocation( new FileSystemResource( filename ) );
        }
    }

    return propertyConfigurer;
}

and try use this in my pojo class:
@Input(label = "Titulo")
@Property(key = "geral.titulo")
@Value(value = "${geral.titulo}")
private String titulo;

but when I create a new instance of this classe, the fields don't receive the value indicated by the annotation. What I am doing wrong? I verify the file and the properties exists in it.
