0

I'd like to set a java property with a value from my properties file or, if it doesn't exist, from a function.

Pseudo code might look like this -

@Value("${server.thread.count:Runtime.getRuntime().availableProcessors()}")
private int numOfThreads;

Any suggestions?

selotape
  • 846
  • 1
  • 13
  • 26
  • 1
    Refer to http://stackoverflow.com/questions/2041558/how-does-spring-3-expression-language-interact-with-property-placeholders – Tunaki Mar 04 '17 at 12:54
  • Thanks! I found my answer down there - http://stackoverflow.com/a/29603277/3052112 – selotape Mar 06 '17 at 11:10

0 Answers0