修复 LogInterceptor 路径错误
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -62,6 +62,11 @@
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.38</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
|
||||
@@ -27,7 +27,7 @@ public class LogInterceptor {
|
||||
/**
|
||||
* 执行拦截
|
||||
*/
|
||||
@Around("execution(* com.yupi.project.controller.*.*(..))")
|
||||
@Around("execution(* com.yolo.keyborad.controller.*.*(..))")
|
||||
public Object doInterceptor(ProceedingJoinPoint point) throws Throwable {
|
||||
// 计时
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author yupi
|
||||
*/
|
||||
@Configuration
|
||||
@MapperScan("com.yupi.project.mapper")
|
||||
@MapperScan("com.yolo.keyborad.mapper")
|
||||
public class MyBatisPlusConfig {
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.yolo.keyborad.controller;
|
||||
|
||||
import com.yolo.keyborad.common.BaseResponse;
|
||||
import com.yolo.keyborad.common.ResultUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2025/10/28 20:42
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/demo")
|
||||
@Slf4j
|
||||
@CrossOrigin
|
||||
public class DemoController {
|
||||
|
||||
@GetMapping("/test")
|
||||
public BaseResponse<String> hostsInfo(){
|
||||
|
||||
return ResultUtils.success("hello world");
|
||||
}
|
||||
}
|
||||
5
src/main/java/com/yolo/keyborad/package-info.java
Normal file
5
src/main/java/com/yolo/keyborad/package-info.java
Normal file
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2025/10/28 20:50
|
||||
*/
|
||||
package com.yolo.keyborad;
|
||||
@@ -1,6 +1,6 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/my_db
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://localhost:5432/postgres
|
||||
username: root
|
||||
password: 123456
|
||||
password: 123asd
|
||||
@@ -3,7 +3,6 @@ spring:
|
||||
name: springboot-init
|
||||
profiles:
|
||||
active: dev
|
||||
# DataSource Config
|
||||
datasource:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://localhost:5432/postgres
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
我的项目 by 程序员鱼皮 https://github.com/liyupi
|
||||
Reference in New Issue
Block a user