Compare commits
2 Commits
c3799fe052
...
d679fd47bd
| Author | SHA1 | Date |
|---|---|---|
|
|
d679fd47bd | |
|
|
67623100b0 |
|
|
@ -33,4 +33,12 @@ management:
|
|||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
enabled-by-default: on
|
||||
enabled-by-default: on
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
health:
|
||||
db:
|
||||
enabled: true
|
||||
redis:
|
||||
enabled: true
|
||||
|
|
@ -44,6 +44,10 @@
|
|||
<groupId>com.github.loki4j</groupId>
|
||||
<artifactId>loki-logback-appender</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch</artifactId>
|
||||
|
|
|
|||
|
|
@ -33,4 +33,18 @@ sa-token:
|
|||
jwt-secret-key: asdasdasifhueuiwyurfewbfjsdafjk
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
root: info
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
enabled-by-default: on
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
health:
|
||||
db:
|
||||
enabled: true
|
||||
redis:
|
||||
enabled: true
|
||||
|
|
@ -31,4 +31,13 @@ management:
|
|||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: "*"
|
||||
include: '*'
|
||||
enabled-by-default: on
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
health:
|
||||
db:
|
||||
enabled: true
|
||||
redis:
|
||||
enabled: true
|
||||
|
|
@ -50,6 +50,10 @@
|
|||
<groupId>org.springframework.ldap</groupId>
|
||||
<artifactId>spring-ldap-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -19,4 +19,18 @@ spring:
|
|||
group: ${spring.profiles.active}
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
root: info
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
enabled-by-default: on
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
health:
|
||||
db:
|
||||
enabled: true
|
||||
redis:
|
||||
enabled: true
|
||||
|
|
@ -34,6 +34,10 @@
|
|||
<groupId>com.github.loki4j</groupId>
|
||||
<artifactId>loki-logback-appender</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch</artifactId>
|
||||
|
|
|
|||
|
|
@ -23,4 +23,18 @@ spring:
|
|||
group: ${spring.profiles.active}
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
root: info
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
enabled-by-default: on
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
health:
|
||||
db:
|
||||
enabled: true
|
||||
redis:
|
||||
enabled: true
|
||||
|
|
@ -17,6 +17,7 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
|
|||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.web.servlet.resource.NoResourceFoundException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -66,4 +67,11 @@ public class GlobalRestControllerAdvice {
|
|||
public String handleNotLoginException(NotLoginException e) {
|
||||
return "请重新登录";
|
||||
}
|
||||
|
||||
@ExceptionHandler(NoResourceFoundException.class)
|
||||
@ResponseStatus(HttpStatus.NOT_FOUND)
|
||||
public ApiResult<Void> handleNoResourceFoundException(NoResourceFoundException ex) {
|
||||
log.error("请求的地址无效: ", ex);
|
||||
return ApiResult.error(STATE.BusinessError, "请求的地址无效:" + ex.getResourcePath());
|
||||
}
|
||||
}
|
||||
2
pom.xml
2
pom.xml
|
|
@ -30,7 +30,7 @@
|
|||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<lombok.version>1.18.34</lombok.version>
|
||||
<lombok.version>1.18.38</lombok.version>
|
||||
<spring-cloud.version>2023.0.1</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2023.0.1.0</spring-cloud-alibaba.version>
|
||||
<hutool-all.version>5.8.36</hutool-all.version>
|
||||
|
|
|
|||
Loading…
Reference in New Issue