1

I have a Spring MVC application. I am using someprops.property file to get some global properties.

I am using Spring's Environment to get this.

@Autowired
private Environment env;

In some method

env.getProperty('some.prop');

My Question here is, will it read the file every time the program calls env.getProperty() or it will remember the last accessed prop and return from that.

Slava Semushin
  • 14,904
  • 7
  • 53
  • 69
Akshay
  • 3,558
  • 4
  • 43
  • 77

1 Answers1

3

It depends. By default properties are read once but you can make them reloadable.

See here

StanislavL
  • 56,971
  • 9
  • 68
  • 98