我尝试使用docker运行我的应用程序,但是当应用程序要连接到neo4j时出现以下错误。
Neo4j.Driver.V1.ServiceUnavailableException: 'Connection with the
server breaks due to IOException: Failed to connect to server
'bolt://127.0.0.1:7687/' via IP addresses'[127.0.0.1]' at port '7687'.'
这是我的docker-compose文件
version: '3'
services:
categoryservice:
image: categoryservice
build:
context: .
dockerfile: CategoryService/Dockerfile
neo4j:
image: neo4j:latest
network_mode: "bridge"
ports:
- "7474:7474"
- "7687:7687"
volumes:
- ./plugins:/plugins
- ./data:/data
- ./import:/import