获取当前路径

public String findByAdvertisementSpaceList(@RequestBody AdvertisementDtoIn advertisementDtoIn,HttpServletRequest request){
String contextPath = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+
request.getServerPort()+contextPath+"/";
logger.debug(basePath);// http://localhost:8081
}
原文地址:https://www.cnblogs.com/liduanwen/p/5527758.html