0

想在 Liferay 7 GA3 的 com.liferay.portal.action 中写 CustomLoginAction。

@Component(
    immediate = true, 
    property = {
            "key=login.action"
    },
    service = LifecycleAction.class
    )

public class CustomLoginAction implements LifecycleAction {

@Override
public void processLifecycleEvent(LifecycleEvent lifecycleEvent) throws ActionException {
    System.out.println(" ==== >> >> CALLING THE LOGIN ACTION ==== >>> >>>" );
}

}

门户-ext.properties

login.action=com.liferay.portal.action.LoginAction

当尝试登录到应用程序调试器时没有点击代码。我需要在我的代码中添加一些东西吗?

4

1 回答 1

0

Actually what you should target is the PreLogin and PostLogin actions.

login.events.post=
login.events.pre=

Hope this helps!

于 2017-04-28T18:03:29.833 回答