启动Spring cloud项目报错
Disconnected from the target VM, address: '127.0.0.1:61860', transport: 'socket'
Process finished with exit code 0
可能的原因
controller里面定义的接口方法路径有可能有重复。
如以下有两个方法,GetMapping的路径一样,启动时候无法启动,报这种错误。
/**
* 分页获取列表
* @param req
* @return
*/
@ApiOperation(value = "分页获取列表")
@GetMapping("/page")
public ResponseResult findListByPage(@Validated MapPageReq req) {
PageResult<MapItem> mmPage = iMapService.selectMapByPage(req);
return ResponseResult.SUCCESS(mmPage);
}
/**
* 查询分页数据
*/
@ApiOperation(value = "查询分页数据" )
@GetMapping("/page" )
public ResponseResult findListByPage(@RequestParam(name = "pageNum", defaultValue = "1" ) int pageNum,@RequestParam(name = "pageSize", defaultValue = "20" ) int pageSize) {
return null;
}