what is the purpose of @Nonbinding annotation in a Qualifier supposed to be in Java EE7?

不羁岁月 提交于 2019-12-05 02:34:44
  1. By default, qualifier arguments are considered for matching bean qualifiers to injection point qualifiers. A @Nonbinding argument is not considered for matching.

  2. In this case, the bean produced by the producer method has qualifier @HttpParam(""). If the argument were binding (i.e. not @Nonbinding), @HttpParam("") would not match @HttpParam("username") on the injection point.

  3. You can have any number of qualifier arguments, binding or non-binding.

See Typesafe resolution in the CDI specification.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!