添加ELK接入的依赖
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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>
|
||||
|
||||
6
pom.xml
6
pom.xml
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user