请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

使用docker-compose命令启动容器失败

在使用docker-compose启动docker时,user-edge-service启动失败

配置文件:

user-edge-service:
    image: user-edge-service:latest
    links:
    - user-service
    - message-service
    ports:
    - 8082:8082
    command:
      - "--redis.address=192.168.1.8"

异常信息:

2020-07-04 15:49:32.278  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectingArgumentResolverBeanPostProcessor' defined in class path resource [org/springframework/data/web/config/ProjectingArgumentResolverRegistrar.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cache.annotation.ProxyCachingConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'redis.address' in value "${redis.address}"
2020-07-04 15:49:32.295  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener : 

正在回答 回答被采纳积分+3

1回答

刘果国 2020-07-05 09:06:57

注意格式:

command:

- "xxxx"

- 和 command对齐

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信