dubbo2.7.7 main方法方式启动-D参数无效
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
dubbo2.7.7main方法方式启动
-Ddubbo.application.name设置的参数值会被dubbo.properties中的值覆盖
-Ddubbo.provider.parameters.pTag=v1 -Ddubbo.consumer.parameters.cTag=v1 自定义参数设置无效
--启动代码如下
public class DrpCenterMain {
private static final Logger logger = LoggerFactory.getLogger(LogConstant.STD_OUT);
public static void main(String[] args) {
@SuppressWarnings("resource")
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath*:spring-drp-*.xml");
context.start();
logger.info("spring 加载成功");
synchronized (DrpCenterMain.class) {
while (true) {
try {
DrpCenterMain.class.wait();
} catch (Throwable e) {
logger.error("error", e);
}
}
}
}
}
--启动脚本如下
nohup java -Ddubbo.application.name -Ddubbo.provider.parameters.pTag=v1 -Ddubbo.consumer.parameters.cTag=v1 com.ruhnn.drp.main.DrpCenterMain >> std.log 2>&1 &
Contributor guide
Research direction
Reproduce the issue using the provided DrpCenterMain startup code and nohup command with Dubbo 2.7.7. Trace how JVM -D properties and dubbo.properties are loaded and prioritized; done when dubbo.application.name and the provider and consumer parameters supplied on the command line are honored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100