下游服务controller:

public class BaseController { 
protected String sessionId = null; 
protected void getSessionIdFromRequest(HttpServletRequest request) {
 this.sessionId = request.getHeader().get("Session-Id");
 }
}

报错信息:

No primary or default constructor found for interface javax.servlet.http.HttpServletReques

原因:Gateway中不支持HttpServletRequest,换成ServerHttpRequest即可!!!

转载于:https://my.oschina.net/u/3734816/blog/3075217

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐