add: 切换线上数据库
This commit is contained in:
parent
0866afbdbb
commit
a14767d48b
@ -30,6 +30,7 @@ public class LogAspectOld {
|
|||||||
public void doBefore(JoinPoint joinPoint){
|
public void doBefore(JoinPoint joinPoint){
|
||||||
// 获取request对象
|
// 获取request对象
|
||||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||||
|
assert attributes != null;
|
||||||
HttpServletRequest request = attributes.getRequest();
|
HttpServletRequest request = attributes.getRequest();
|
||||||
// URL
|
// URL
|
||||||
String url = request.getRequestURL().toString();
|
String url = request.getRequestURL().toString();
|
||||||
@ -49,7 +50,6 @@ public class LogAspectOld {
|
|||||||
// logger.info("-------doafter-----------");
|
// logger.info("-------doafter-----------");
|
||||||
}
|
}
|
||||||
|
|
||||||
//@AfterReturning(returning = "result",pointcut = "log()")
|
|
||||||
public void doAfterReturn(Object result){
|
public void doAfterReturn(Object result){
|
||||||
logger.info("控制器方法名称Result : {}",result);
|
logger.info("控制器方法名称Result : {}",result);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,20 +1,21 @@
|
|||||||
#数据库驱动mysql
|
#数据库驱动mysql
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://127.0.0.1:3306/mx-blog?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
url: jdbc:mysql://103.153.100.47:3306/mx-blog?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||||
username: root
|
username: root
|
||||||
password: josxy
|
password: qfmx07229710
|
||||||
jpa:
|
jpa:
|
||||||
hibernate:
|
hibernate:
|
||||||
ddl-auto: update
|
ddl-auto: update
|
||||||
show-sql: true
|
show-sql: false
|
||||||
|
|
||||||
#日志打印
|
#日志打印
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
root: info
|
root: info
|
||||||
com.yrp: debug
|
cn.allms: debug
|
||||||
file: log/blog-dev.log
|
file:
|
||||||
|
name: log/blog-dev.log
|
||||||
server:
|
server:
|
||||||
port: 9420
|
port: 9420
|
||||||
Loading…
Reference in New Issue
Block a user