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.
30 lines
1.3 KiB
30 lines
1.3 KiB
package com.tptj.demo.hg.lifecycle.monitor; |
|
|
|
import com.fanruan.api.log.LogKit; |
|
import com.fr.decision.webservice.bean.authentication.LoginRequestInfoBean; |
|
import com.fr.decision.webservice.bean.authentication.LoginResponseInfoBean; |
|
import com.fr.decision.webservice.v10.login.LoginService; |
|
import com.fr.intelli.record.Focus; |
|
import com.fr.record.analyzer.EnableMetrics; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
/** |
|
* @author 秃破天际 |
|
* @version 10.0 |
|
* Created by 秃破天际 on 2021-05-21 |
|
* 这个仅仅是教学使用的方法,实际项目上不建议这样用,容易产生冲突 |
|
* (试想,如果两个插件都继承替换了同一个service,必然会产生冲突) |
|
**/ |
|
@EnableMetrics |
|
public class DemoLoginService extends LoginService { |
|
@Override |
|
@Focus(id = "com.tptj.demo.hg.lifecycle.monitor.v10",text = "lifecycle monitor") |
|
public LoginResponseInfoBean login(HttpServletRequest req, |
|
HttpServletResponse res, |
|
LoginRequestInfoBean loginReqInfo) throws Exception { |
|
LogKit.info("##### username={},origin={}",loginReqInfo.getUsername(),loginReqInfo.getOrigin()); |
|
return super.login(req,res,loginReqInfo); |
|
} |
|
}
|
|
|