试过–net=host和–add-host=host.docker.internal:host-gateway 都不能让镜像访问宿主主机的数据库, 我怀疑是我宝塔的Docker管理器配置有点问题 请教一下各位大佬 我是把下面这段代码填到这个启动命令中的,不知道是什么原因,各位大佬不吝赐教 –add-host=host.docker.internal:host-gateway –spring.datasource.url=jdbc:mysql://host.docker.internal:3306/note?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 –spring.datasource.username=root –spring.datasource.password=111
没有回复内容