修复 LogInterceptor 路径错误
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -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>
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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:
|
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
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
我的项目 by 程序员鱼皮 https://github.com/liyupi
|
|
||||||
Reference in New Issue
Block a user