首页>代码>基于Spring+Spring MVC+Mybatis开发的社区论坛系统>/Genesis-master/src/main/java/com/withstars/aop/LogAspect.java
package com.withstars.aop; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.springframework.stereotype.Component; /** * Created with IntelliJ IDEA. * Description: * User: withstars * Date: 2018-02-22 * Time: 20:41 * Mail: withstars@126.com */ @Component @Aspect public class LogAspect { private final Log log = LogFactory.getLog(getClass()); @Before("execution(* com.withstars.controller.UserController.signin(..))") public void loginLogAspect(JoinPoint joinPoint){ String methodName=joinPoint.getSignature().toShortString(); String args=joinPoint.getArgs().toString(); log.info("---Before method "+methodName+" invoke, param:" +args+"---"); } }

玖零定制问题修复 LV34
2024年3月3日
ewan007 LV30
2024年2月25日
2897744513 LV2
2023年12月31日
lilong007 LV23
2023年12月30日
wang123999 LV19
2023年12月5日
liuyuheng LV17
2023年11月15日
全栈小白 LV35
2023年11月6日
Seaskye LV14
2023年11月4日
Dramaaaa LV3
2023年11月4日
zxc131313 LV12
2023年11月2日

PLVAE_514 LV2
3月7日
ChanLain LV2
3月3日
andy_伟 LV6
2月25日
asdfg01234 LV10
1月10日
meng123wei
1月6日
暂无贡献等级
weishenme1993 LV9
1月1日
srmess LV4
2024年12月30日
ninuxf LV12
2024年12月28日
Junnnn
2024年12月28日
暂无贡献等级
ma406805131 LV19
2024年12月18日