Is @Produces more efficient that a getter in an EL expression

…衆ロ難τιáo~ 提交于 2019-11-29 17:57:33

That depends on how your producer scopes what is being produced. If it's dependent scoped (meaning you don't have a scope on it, nor on the containing class) it ends up being the same, possibly less depending what it is you are having to do inside that method.

In your example it should be more efficient because that producer method should only be called once (per request).

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