Skip to content

Commit 654a490

Browse files
committed
2 parents b6d378d + f697329 commit 654a490

File tree

26 files changed

+523
-79
lines changed

26 files changed

+523
-79
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.quick.controller;
2+
3+
4+
import org.springframework.web.bind.annotation.RequestMapping;
5+
6+
import org.springframework.web.bind.annotation.RestController;
7+
8+
/**
9+
* <p>
10+
* 前端控制器
11+
* </p>
12+
*
13+
* @author vector4wang
14+
* @since 2023-10-17
15+
*/
16+
@RestController
17+
@RequestMapping("/depot-entity")
18+
public class DepotController {
19+
20+
}
21+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package com.quick.entity;
2+
3+
import com.baomidou.mybatisplus.annotation.IdType;
4+
import com.baomidou.mybatisplus.annotation.TableField;
5+
import com.baomidou.mybatisplus.annotation.TableId;
6+
import com.baomidou.mybatisplus.annotation.TableName;
7+
import java.io.Serializable;
8+
import lombok.Getter;
9+
import lombok.Setter;
10+
11+
/**
12+
* <p>
13+
*
14+
* </p>
15+
*
16+
* @author vector4wang
17+
* @since 2023-10-17
18+
*/
19+
@Getter
20+
@Setter
21+
@TableName("depot")
22+
public class DepotEntity implements Serializable {
23+
24+
private static final long serialVersionUID = 1L;
25+
26+
@TableId(value = "id", type = IdType.AUTO)
27+
private Integer id;
28+
29+
@TableField("pid")
30+
private Integer pid;
31+
32+
@TableField("code")
33+
private String code;
34+
35+
36+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.quick.mapper;
2+
3+
import com.quick.entity.DepotEntity;
4+
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5+
6+
/**
7+
* <p>
8+
* Mapper 接口
9+
* </p>
10+
*
11+
* @author vector4wang
12+
* @since 2023-10-17
13+
*/
14+
public interface DepotMapper extends BaseMapper<DepotEntity> {
15+
16+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3+
<mapper namespace="com.quick.mapper.DepotMapper">
4+
5+
<!-- 通用查询映射结果 -->
6+
<resultMap id="BaseResultMap" type="com.quick.entity.DepotEntity">
7+
<id column="id" property="id" />
8+
<result column="pid" property="pid" />
9+
<result column="code" property="code" />
10+
</resultMap>
11+
12+
<!-- 通用查询结果列 -->
13+
<sql id="Base_Column_List">
14+
id, pid, code
15+
</sql>
16+
17+
</mapper>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.quick.service;
2+
3+
import com.quick.entity.DepotEntity;
4+
import com.baomidou.mybatisplus.extension.service.IService;
5+
6+
/**
7+
* <p>
8+
* 服务类
9+
* </p>
10+
*
11+
* @author vector4wang
12+
* @since 2023-10-17
13+
*/
14+
public interface DepotService extends IService<DepotEntity> {
15+
16+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.quick.service.impl;
2+
3+
import com.quick.entity.DepotEntity;
4+
import com.quick.mapper.DepotMapper;
5+
import com.quick.service.DepotService;
6+
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7+
import org.springframework.stereotype.Service;
8+
9+
/**
10+
* <p>
11+
* 服务实现类
12+
* </p>
13+
*
14+
* @author vector4wang
15+
* @since 2023-10-17
16+
*/
17+
@Service
18+
public class DepotServiceImp extends ServiceImpl<DepotMapper, DepotEntity> implements DepotService {
19+
20+
}

quick-log/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
<version>1.0-SNAPSHOT</version>
3333
</dependency>
3434

35+
<dependency>
36+
<groupId>cn.hutool</groupId>
37+
<artifactId>hutool-all</artifactId>
38+
</dependency>
39+
3540
<dependency>
3641
<groupId>org.springframework.boot</groupId>
3742
<artifactId>spring-boot-starter-log4j2</artifactId>

quick-log/src/main/java/com/quick/log/Application.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.quick.log;
22

3-
import com.quick.component.enables.EnableGlobalExceptionHandler;
3+
import com.quick.component.enables.QsEnableAroundLog;
4+
import com.quick.component.enables.QsEnableGlobalExceptionHandler;
45
import org.springframework.boot.SpringApplication;
56
import org.springframework.boot.autoconfigure.SpringBootApplication;
67
import org.springframework.scheduling.annotation.EnableScheduling;
@@ -14,7 +15,8 @@
1415
*/
1516
@SpringBootApplication
1617
@EnableScheduling
17-
@EnableGlobalExceptionHandler
18+
@QsEnableGlobalExceptionHandler
19+
@QsEnableAroundLog(value = "execution(public * com.*..service.*.*(..))")
1820
public class Application {
1921
public static void main(String[] args) {
2022
SpringApplication.run(Application.class, args);

quick-log/src/main/java/com/quick/log/config/WebLogAspect.java

Lines changed: 0 additions & 62 deletions
This file was deleted.

quick-log/src/main/java/com/quick/log/controller/ApiController.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ public Map<String,Object> shotLog(@RequestParam("name")String name,@RequestParam
2727
Map<String,Object> result = new HashMap<>();
2828
result.put("name",name);
2929
result.put("age",age);
30-
for(int i=0;i<100000000;i++) {
31-
32-
loggerService.showLog();
33-
}
3430
return result;
3531
}
3632

0 commit comments

Comments
 (0)