I have some property file like:
application.properties
enable.test.controller=true
enable.cross.origin=false
I want to enable/disable some functions based on the profile. For example, I have a controller which only opening in specific environment:
@Controller(enable=${enable.test.controller})
public class TestController() {
}
And I also want to enable/disable annotation @CrossOrigin property
@Controller
@CrossOrigin(enable=${enable.cross.origin})
public class TestController2() {
}
Is there any way to make @Annotation(enable=${property}) work?
Any suggestion will be appreciated!