You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/11/06 06:52:03 UTC

[GitHub] [servicecomb-java-chassis] 1060920512 opened a new issue #2041: CSE中怎么实现重定向

1060920512 opened a new issue #2041:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2041


   我之前用了http 302,但是我从A.com重定向到B.com后,我不能在B.com设置cookie,header。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2041: CSE中怎么实现重定向

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2041:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2041#issuecomment-723006220


   可以的。 但是你需要理解 spring mvc 和 java chassis RPC 的差异,两个是完全不一样的 servlet 提供的服务, 它们可以并存。 这个问题涉及的点比较多,可以参考下 [说明](https://docs.servicecomb.io/java-chassis/zh_CN/build-provider/springmvc/)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2041: CSE中怎么实现重定向

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2041:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2041#issuecomment-722916230


   这个感觉就是不能哦。 重定向到另外一个网站的时候, 浏览器就会加载 location 对应的地址, 即 B.com, 后续的处理都是 B.com 地址加载过程了。 
   
   不知道你是怎么做,觉得可以在 B.com 设置 cookie 的? 不太理解你的使用方式。 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] 1060920512 commented on issue #2041: CSE中怎么实现重定向

Posted by GitBox <gi...@apache.org>.
1060920512 commented on issue #2041:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2041#issuecomment-722951043


       <dependencyManagement>
           <dependencies>
               <dependency>
                   <groupId>org.apache.servicecomb</groupId>
                   <artifactId>java-chassis-dependencies</artifactId>
                   <version>${servicecomb.version}</version>
                   <type>pom</type>
                   <scope>import</scope>
               </dependency>
           </dependencies>
       </dependencyManagement>
   
       <dependencies>
           <dependency>
               <groupId>org.apache.servicecomb</groupId>
               <artifactId>foundation-common</artifactId>
               <version>${servicecomb.version}</version>
               <scope>compile</scope>
           </dependency>
   
           <!-- servicecomb website -->
           <dependency>
               <groupId>org.apache.servicecomb</groupId>
               <artifactId>solution-basic</artifactId>
           </dependency>
           <dependency>
               <groupId>org.apache.servicecomb</groupId>
               <artifactId>registry-service-center</artifactId>
           </dependency>
           <dependency>
               <groupId>org.apache.servicecomb</groupId>
               <artifactId>java-chassis-spring-boot-starter-servlet</artifactId>
           </dependency>
           <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter-web</artifactId>
               <!-- 排除logback -->
               <exclusions>
                   <exclusion>
                       <artifactId>logback-classic</artifactId>
                       <groupId>ch.qos.logback</groupId>
                   </exclusion>
               </exclusions>
           </dependency>
           <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter-freemarker</artifactId>
           </dependency>
   ... ...
   @SpringBootApplication
   @EnableServiceComb
   public class AuthenticationMain {
       public static void main(String[] args) throws Exception {
           Log4jUtils.init();
           SpringApplication.run(AuthenticationMain.class, args);
       }
   }
   ------
   这样就可以在@Controller下的接口使用HttpServletResponse的重定向方法。
   CSE也可以用SpringBoot启动和使用@Controller?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2041: CSE中怎么实现重定向

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2041:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2041#issuecomment-722924871


   servicecomb-+springboot 是指这里的[说明](https://docs.servicecomb.io/java-chassis/zh_CN/using-java-chassis-in-spring-boot/using-java-chassis-in-spring-boot/)吗?
   
   CSE 版本和 servicecomb 是一样的,之间并没有差异。 参考: https://support.huaweicloud.com/productdesc-servicestage/cse_productdesc_0008.html


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] 1060920512 closed issue #2041: CSE中怎么实现重定向

Posted by GitBox <gi...@apache.org>.
1060920512 closed issue #2041:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2041


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] 1060920512 commented on issue #2041: CSE中怎么实现重定向

Posted by GitBox <gi...@apache.org>.
1060920512 commented on issue #2041:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2041#issuecomment-722917834


   之前用servicecomb+springboot,有HttpServletResponse的方法可以直接重定向,但我们项目都用CSE,所以问问CSE中有没方法实现。
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org