使用docker-compose命令启动容器失败
来源:4-3 docker下的服务通讯(上)

慕田峪2263497
2020-07-05
在使用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 :
写回答
1回答
-
刘果国
2020-07-05
注意格式:
command:
- "xxxx"
- 和 command对齐
00
相似问题