You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
938 B
28 lines
938 B
package com.fr.plugin.demo.loginout.event; |
|
|
|
import com.fr.decision.fun.impl.AbstractLogInOutEventProvider; |
|
import com.fr.decision.webservice.login.LogInOutResultInfo; |
|
import com.fr.log.FineLoggerFactory; |
|
import com.fr.plugin.transform.FunctionRecorder; |
|
import com.fr.web.utils.WebUtils; |
|
|
|
/** |
|
* @Author: Elijah |
|
* @Create: 2019-02-20 |
|
* @Desciption: |
|
*/ |
|
@FunctionRecorder |
|
public class CustomLogInOutEventProvider extends AbstractLogInOutEventProvider { |
|
|
|
@Override |
|
public void loginAction(LogInOutResultInfo result) { |
|
FineLoggerFactory.getLogger().info(result.getUsername() + " login, ip: " + WebUtils.getIpAddr(result.getRequest())); |
|
super.loginAction(result); |
|
} |
|
|
|
@Override |
|
public String logoutAction(LogInOutResultInfo result) { |
|
FineLoggerFactory.getLogger().info(result.getUsername() + " logout, ip: " + WebUtils.getIpAddr(result.getRequest())); |
|
return "http://www.baidu.com"; |
|
} |
|
} |