Liferay LocalServiceUtil and ServiceUtil

来源:互联网 发布:电脑日记本软件排名榜 编辑:程序博客网 时间:2024/04/29 10:35

In Liferay, there's a lot of Service Util classes. They're really convenient. One thing I notice is that there's LocalServiceUtil and ServiceUtil class.

The difference between them is permission check.

For example:

UserLocalServiceUtil: It works even though we don't log in.

UserServiceUtil: It will check the permission. If we don't log in. It reports errors.

原创粉丝点击