You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "CjqDy (GitHub)" <gi...@apache.org> on 2019/04/02 12:03:55 UTC
[GitHub] [incubator-dubbo] CjqDy opened issue #3794: dubbo consumer
,how to modify the server port
### Environment
* Dubbo version: com.alibaba.dubbo v2.6.5
* Java version: 1.8_x
### Steps to reproduce this issue
public static void main(String[] args) throws Exception {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/spring.xml");
context.start();
System.out.println("demo-provider-start................");
System.in.read();
}
spring boot 启动类 通过ClassPathXmlApplicationContext实现无法修改server.port
启动可以正常启动,依赖的springboot的相关包也都有,但是修改的端口无效
Pls. provide [GitHub address] to reproduce this issue.
### Expected Result
What do you expected from the above steps?
### Actual Result
What actually happens?
If there is an exception, please attach the exception trace:
```
Just put your stack trace here!
```
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3794 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] CjqDy commented on issue #3794: dubbo
consumer ,how to modify the server port
Posted by "CjqDy (GitHub)" <gi...@apache.org>.
> If you use springboot + dubbo, I think you should not use ClassPathXmlApplicationContext.
>
> You can use in springboot way, and add @ImportResource("spring/spring.xml") 。
I have tried before , But can't load other xml files introduced in spring.xml
I think I want to use web projects as a consumer. may be better
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3794 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] CjqDy closed issue #3794: dubbo consumer
,how to modify the server port
Posted by "CjqDy (GitHub)" <gi...@apache.org>.
[ issue closed by CjqDy ]
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3794 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] cvictory commented on issue #3794: dubbo
consumer ,how to modify the server port
Posted by "cvictory (GitHub)" <gi...@apache.org>.
Spring can work with spring boot.
You can refer : https://github.com/apache/incubator-dubbo-spring-boot-project/blob/master/README_CN.md
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3794 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] cvictory commented on issue #3794: dubbo
consumer ,how to modify the server port
Posted by "cvictory (GitHub)" <gi...@apache.org>.
If you use springboot + dubbo, I think you should not use ClassPathXmlApplicationContext.
You can use in springboot way, and add @ImportResource("spring/spring.xml") 。
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3794 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org