I have a @ConfigurationProperties
class, like ConfigProperty
. I use it like
org.springframework.ui.Model#addAttribute("config1", configProperty.config1) org.springframework.ui.Model#addAttribute("config2", configProperty.config2)
I don't want repeat myself. So I want to it like this:
Model#addAttribute(::configProperty.config1.name, configProperty.config1) Model#addAttribute(::configProperty.config2.name, configProperty.config2)
But the syntax is wrong, anyone has some suggestions?