سؤال

I want to retrieve all CDI beans from container as map which bean names as keys and beans as values. How could I achieve this?

I need this to add CDI beans to thymeleaf expression resolver.

هل كانت مفيدة؟

المحلول

Write a portable extension and this to the ProcessAnnotatedType event. Then have it look for types which have the @Named annotation and add it to a static map on your class, or some other class.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top