Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top