My solution is to define a flag in property file, and injected it during the runtime;
Using the @Value, and maybe combined with @ProperySource , I am using spring boot 2.0 and found that the application property file already read in the Spring context.
spring-value-annotation
There are several options, the following may be an option for the boot 1.5
security.basic.enabled=false
management.security.enabled=false
No comments:
Post a Comment