我正在研究mitreid-connect/OpenID-Connect-Java-Spring-Server的实现,它建议您使用 Maven Overlay 扩展和自定义项目。我已按照说明进行操作,然后将以下代码添加到webapp-overlay/src/main/java/controller/HealthcheckController.java
package controller;
import org.springframework.context.annotation.Primary;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
@Primary
public class HealthcheckController {
@RequestMapping(value = "/healthcheckwebapp", method = RequestMethod.GET, produces = MediaType.TEXT_PLAIN_VALUE)
public String getHealthCheck() {
return "200 OK";
}
}
但是,我在实际尝试到达路线时收到 404。难道我做错了什么?
守着一只汪
慕仙森
喵喵时光机
相关分类