When I was using spring MVC, its annotation features is very difference between XML way. It seems can be more convenient and efficient. BUT, HOW TO INJECT a number of properties into a number of bean made me feel confused.
As all we know, in XML way, it was very clear as below.
${"xxx.xxx.key:default"}
also, the spel is equivalent to @Value
.
but, with @Value
, there are too many global field need to be defined in a bean.
So, how to avoid it? or a better practice? I have tried PropertyOverrideConfigurer
, but beanname.field is not a better choice for me?