修复 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>
<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>

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 {
// 计时
StopWatch stopWatch = new StopWatch();

View File

@@ -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 {
/**

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:
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

View File

@@ -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

View File

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