I have an alternative in my app, that looks like this:
@Alternative
public class MyAlternative { ... }
And it works when enabled on my app's beans.xml, as expected.
However, I'd like to enable this alternative in the beans.xml of another app
that's using a jar with this alternative. Is it possible?
在CDI 1.1+中,可以使用@Priority
批注为整个应用程序启用替代方法。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.