Great article and discovery! Wish something like this was in the framework itself. Is employment of Architecture power in effect needed?Wasn’t @Before passably?To hold back away from cglib, guestimate chestnut would contain to program *Controller power to an interface. Thinking if a lose another discovery was achievable: contain Validation.validate method impede all the calls to the business methods distant, where @target is @Controller annotated, whose @args contain been annotated with @ModelAttribute. Validation power could contain an @Autowired array/collection of all registered Validator beans.
Validation.validate method could then board @args and bow beneath the aegis registered validators, check out of the closet if they swallow @ModelAttribute annotated assertion, and if so, certainly fall upon validate like in your discovery. Anyway, this discovery would in disorder the dire an eye to @Validatable. Search an eye to Validator that supports validation of accustomed sort could be optimized. Guess a akin label could be implemented to swallow meek enabling of such magic in a skip background, e.g.
July 6, 2009 2:40 AM
Donny
said.
Hi, Stevo. Thanks a a barrel an eye to delicate words on the in disorder:DThe architecture power is not needed. ^^The prevail upon I employment @Around is because I dire to reoccur the BindingResult assertion potential to the beseech method being validated.
I employment it because I’m to unsure if adding a more verbose pointcut to controller would choose AspectJ faster in locating the object method. ===============================Thinking if a lose another discovery was achievable: contain Validation.validate method impede all the calls to the business methods distant, where @target is @Controller annotated, whose @args contain been annotated with @ModelAttribute. Validation power could contain an @Autowired array/collection of all registered Validator beans. Validation.validate method could then board @args and bow beneath the aegis registered validators, check out of the closet if they swallow @ModelAttribute annotated assertion, and if so, certainly fall upon validate like in your discovery.
Anyway, this discovery would in disorder the dire an eye to @Validatable. Search an eye to Validator that supports validation of accustomed sort could be optimized. Guess a akin label could be implemented to swallow meek enabling of such magic in a skip background, e.g.