Spring boot properties to be loaded at initialization and respect all and control @Aspect based on the value from property file
问题 We are loading properties from an external file using @PropertySources . Now I want to enable/disable @Aspect based on a property. I tried using @ConditionalOnExpression which didn't work. I tried the same by creating a bean of propertyplaceholderconfig . Even in the same case, it didn't work. Then I tried @profile which also didn't work initially. What I Figured out is that these variables are not initialized at the starting when propertysource or propertyplaceholder bean is used at startup.