添加ELK接入的依赖

This commit is contained in:
feng.li
2023-11-13 18:45:47 +08:00
parent 8ab3a1c994
commit bc8b970470
4 changed files with 26 additions and 0 deletions

View File

@@ -43,6 +43,11 @@
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- ELK -->
<dependency>
<groupId>com.github.danielwegener</groupId>
<artifactId>logback-kafka-appender</artifactId>
</dependency>
</dependencies>

View File

@@ -27,6 +27,7 @@ import com.cool.store.vo.cuser.IdentityCardInfoVO;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -67,6 +68,15 @@ public class TestController {
@Autowired
private WechatMiniAppService wechatMiniAppService;
@Value("${logging.config}")
private String loggingConfig;
@GetMapping("/log/config")
public String testLoggingConfig() {
log.debug("Test");
return loggingConfig;
}
@PostMapping("/post")
public ResponseResult<Boolean> get(@RequestBody List<TestRequest> testRequestList){
log.info(JSONObject.toJSONString(testRequestList));

View File

@@ -43,6 +43,11 @@
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- ELK -->
<dependency>
<groupId>com.github.danielwegener</groupId>
<artifactId>logback-kafka-appender</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -229,6 +229,12 @@
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<!-- ELK接入 -->
<dependency>
<groupId>com.github.danielwegener</groupId>
<artifactId>logback-kafka-appender</artifactId>
<version>0.2.0-RC2</version>
</dependency>
</dependencies>
</dependencyManagement>