将项目的 127.0.0.1替换成 host.docker.internal

    image.png

    修改mac 的hosts,这样在idea中使用 host.docker.internal作为localhost就能被识别

    image.png