fix: 修复升级 spring boot 后重启eureka不能自动续期的问题,如果 spring 后续修复这个问题这次改动可以丢弃
https://github.com/spring-cloud/spring-cloud-netflix/issues/4145
This commit is contained in:
parent
2de0e2d730
commit
aaf3421d25
|
@ -0,0 +1,18 @@
|
||||||
|
package io.metersphere.eureka;
|
||||||
|
|
||||||
|
import org.springframework.boot.web.servlet.error.ErrorController;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class CustomErrorController implements ErrorController {
|
||||||
|
|
||||||
|
private static final String ERROR_MAPPING = "/error";
|
||||||
|
|
||||||
|
@RequestMapping(ERROR_MAPPING)
|
||||||
|
public ResponseEntity<Void> error() {
|
||||||
|
return ResponseEntity.notFound().build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue