Issue
I am trying to set the value for @Order
annotation in the following way:
@Order(value = "#{environment.orderConfig}")
@EnableWebSecurity
public class LocalDevSecurityConfig extends WebSecurityConfigurerAdapter {
...
}
In my environment file, I have the value of orderConfig
as an integer.
The issue here is that value
expects an int
whereas #{environment.orderConfig}
is a String
. Is there any way to use the value stored in the environment variable?
Solution
The @Order
annotation does not support this.
Answered By - Khair Muhammad
Answer Checked By - Terry (JavaFixing Volunteer)