Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 Java EE 7 技术堆栈从 Glassfish 4 中的 CDI 扫描中排除部分或全部包?
我尝试了Weld 文档中描述的机制,但它似乎不适用于 Glassfish 4。
不知道为什么它不工作,但尝试使用@Vetoed而不是特定的焊接xsd,beans.xml因为@Vetoed它是独立于实现的,因此更便携。它应该可以工作,因为它标有@Target({ElementType.TYPE, ElementType.PACKAGE}).
@Vetoed
xsd
beans.xml
@Target({ElementType.TYPE, ElementType.PACKAGE})