Сохранить аннотации на прокси CGLIB?

Я не знаю, что они быстрее. Мне нравится использовать ORM для доступа к данным (для не перестраивания колеса), но я понимаю, что это - не всегда жизнеспособный вариант.

у Frans Bouma есть хорошая статья об этом предмете: http://weblogs.asp.net/fbouma/archive/2003/11/18/38178.aspx

18
задан Rafael Winterhalter 2 May 2014 в 18:36
поделиться

1 ответ

This isn't an issue with "retaining" the annotations. CGLIB proxies are actually generated subclasses of the target object's class. These subclasses may not have annotations, but their superclass (i.e. your own class) will still have them. Any annotation-reflecting code you use needs to be able to look back up the class hierarchy to look for annotations.

5
ответ дан 30 November 2019 в 08:21
поделиться
Другие вопросы по тегам:

Похожие вопросы: