fix: 修复升级 spring boot 后重启eureka不能自动续期的问题,如果 spring 后续修复这个问题这次改动可以丢弃

https://github.com/spring-cloud/spring-cloud-netflix/issues/4145
This commit is contained in:
CaptainB 2023-02-03 10:47:51 +08:00 committed by 刘瑞斌
parent 2de0e2d730
commit aaf3421d25
1 changed files with 18 additions and 0 deletions

View File

@ -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();
}
}