You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "hrwhat (GitHub)" <gi...@apache.org> on 2019/01/09 01:54:16 UTC

[GitHub] [incubator-dubbo-ops] hrwhat opened issue #236: 请问部署时我要设置一个context-path除了在后端工程里配置之外,前端工程要做何修改?

后端要在application.properties里增加
`server.servlet.context-path=/dubbo`
但是这样改了后前端发一后端的请求地址并不能自动加上/dubbo
例:http://xx.xx.xx.xx:8888/api/dev/service?pattern=service&filter=*
请问要如何修改?

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/issues/236 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-ops] hrwhat commented on issue #236: 请问部署时我要设置一个context-path除了在后端工程里配置之外,前端工程要做何修改?

Posted by "hrwhat (GitHub)" <gi...@apache.org>.
貌似自己找到了:
1. config/index.js  assetsPublicPath: '/dubbo/',
2. src/components/http-common.js  baseURL : '/dubbo/api/dev'

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/issues/236 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-ops] nzomkxia commented on issue #236: 请问部署时我要设置一个context-path除了在后端工程里配置之外,前端工程要做何修改?

Posted by "nzomkxia (GitHub)" <gi...@apache.org>.
> 貌似自己找到了:
> 
> 1. config/index.js  assetsPublicPath: '/dubbo/',
> 2. src/components/http-common.js  baseURL : '/dubbo/api/dev'
> 3. src/components/ServiceSearch.vue  getHref 和 governanceHref 方法里把地址的绝对路径改为相对路径 ,即:
>    `return '/#/serviceDetail?' + query`  改为 `return '#/serviceDetail?' + query`
>    `let base = '/#/governance/' + type` 改为 `let base = '#/governance/' + type`

谢谢,前两个是配置,第三点之前的写法不对,你改掉的是对的,能提个pr么?

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/issues/236 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-ops] hrwhat commented on issue #236: 请问部署时我要设置一个context-path除了在后端工程里配置之外,前端工程要做何修改?

Posted by "hrwhat (GitHub)" <gi...@apache.org>.
貌似自己找到了:
1. config/index.js  assetsPublicPath: '/dubbo/',
2. src/components/http-common.js  baseURL : '/dubbo/api/dev'
3. src/components/ServiceSearch.vue  getHref 和 governanceHref 方法里把地址的绝对路径改为相对路径 ,即:
`return '/#/serviceDetail?' + query`  改为 `return '#/serviceDetail?' + query`
`let base = '/#/governance/' + type` 改为 `let base = '#/governance/' + type`

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/issues/236 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-ops] nzomkxia closed issue #236: 请问部署时我要设置一个context-path除了在后端工程里配置之外,前端工程要做何修改?

Posted by "nzomkxia (GitHub)" <gi...@apache.org>.
[ issue closed by nzomkxia ]

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/issues/236 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org