Akash Bharambe
Akash Bharambe

Reputation: 1

Inject Value in static final field from application.properties

How can I inject value in a static final field from application.properties file

Injecting in just static field is possible but injecting in static final field, how it can be achieved

@Value and System.getenv do not work.

Upvotes: -1

Views: 56

Answers (1)

talex
talex

Reputation: 20544

There is no simple reliable way to achieve that.

I suggest you to redesign your code.

Upvotes: 1

Related Questions