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