mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-23 12:08:33 +08:00
修复切片
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.zbkj.admin.acpect;
|
||||
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
/**
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
* 所有的前端controller层的拦截业务,方法的执行时间长度,
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
public class ControllerAspect {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(ControllerAspect.class);
|
||||
|
||||
@Pointcut("execution(* com.zbkj.admin.controller.*.*(..))")
|
||||
private void pointCutMethodController() {
|
||||
|
||||
}
|
||||
|
||||
@Around("pointCutMethodController()")
|
||||
public Object doAroundService(ProceedingJoinPoint pjp) throws Throwable {
|
||||
|
||||
long begin = System.nanoTime();
|
||||
|
||||
Object obj = pjp.proceed();
|
||||
|
||||
long end = System.nanoTime();
|
||||
|
||||
logger.info("Controller method:{},prams:{},cost time:{} ns,cost:{} ms",
|
||||
|
||||
pjp.getSignature().toString(), Arrays.toString(pjp.getArgs()), (end - begin), (end - begin) / 1000000);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,14 +38,14 @@ spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://118.178.234.105:3306/crmeb_test01?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimeZone=GMT+8
|
||||
username: crmeb_test01
|
||||
password: F52EH5FLAfYDzZ66
|
||||
url: jdbc:mysql://127.0.0.1:3306/crmeb?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimeZone=GMT+8
|
||||
username: crmeb
|
||||
password: 111111
|
||||
|
||||
redis:
|
||||
host: 118.178.234.105 #地址
|
||||
host: 127.0.0.1 #地址
|
||||
port: 6379 #端口
|
||||
password: 1qazxsw2
|
||||
password: 111111
|
||||
timeout: 30000 # 连接超时时间(毫秒)
|
||||
database: 15 #默认数据库
|
||||
jedis:
|
||||
|
||||
Reference in New Issue
Block a user