修复 LogInterceptor 路径错误

This commit is contained in:
2025-10-28 21:14:51 +08:00
parent cda3512456
commit 47a87f8c34
8 changed files with 38 additions and 7 deletions

View File

@@ -62,6 +62,11 @@
<artifactId>knife4j-spring-boot-starter</artifactId> <artifactId>knife4j-spring-boot-starter</artifactId>
<version>3.0.3</version> <version>3.0.3</version>
</dependency> </dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.38</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId> <artifactId>spring-boot-devtools</artifactId>

View File

@@ -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 { public Object doInterceptor(ProceedingJoinPoint point) throws Throwable {
// 计时 // 计时
StopWatch stopWatch = new StopWatch(); StopWatch stopWatch = new StopWatch();

View File

@@ -13,7 +13,7 @@ import org.springframework.context.annotation.Configuration;
* @author yupi * @author yupi
*/ */
@Configuration @Configuration
@MapperScan("com.yupi.project.mapper") @MapperScan("com.yolo.keyborad.mapper")
public class MyBatisPlusConfig { public class MyBatisPlusConfig {
/** /**

View File

@@ -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");
}
}

View File

@@ -0,0 +1,5 @@
/*
* @author: ziin
* @date: 2025/10/28 20:50
*/
package com.yolo.keyborad;

View File

@@ -1,6 +1,6 @@
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: org.postgresql.Driver
url: jdbc:mysql://localhost:3306/my_db url: jdbc:postgresql://localhost:5432/postgres
username: root username: root
password: 123456 password: 123asd

View File

@@ -3,7 +3,6 @@ spring:
name: springboot-init name: springboot-init
profiles: profiles:
active: dev active: dev
# DataSource Config
datasource: datasource:
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/postgres url: jdbc:postgresql://localhost:5432/postgres

View File

@@ -1 +0,0 @@
我的项目 by 程序员鱼皮 https://github.com/liyupi