spring - 每次重新加载时 % 符号在 URL 中编码为 %25

标签 spring angular spring-data-rest angular2-router3

© 使用 Spring-Data-Rest 和 Angular 2

% URL 编码代码 %25 ( http://www.w3schools.com/tags/ref_urlencode.asp )

首先;

http://localhost:4200/members/http%3A%2F%2Flocalhost%3A8080%2FErPApI%2Forganizations%2F1/detail

当导航此 URL 并再次重新加载页面或复制粘贴新标签页链接时

% 再次编码 %25。每次重新加载它。

http://localhost:4200/members/http%253A%252F%252Flocalhost%253A8080%252FErPApI%252Forganizations%252F1/detail

所以我丢失了成员(member)ID。我怎样才能再次阻止编码 %?

最佳答案

我在获取链接的时候用了下面的方法

 decodeURIComponent()

关于spring - 每次重新加载时 % 符号在 URL 中编码为 %25,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42207812/

相关文章:

java - 如何在 thymeleaf 中转义双引号?

java - org.springframework.context.ConfigurableApplicationContext 类型无法解析。它是从所需的 .class 文件中间接引用的

angular - 在 Angular 2 中,如何使用父路由确定子路由中的事件路由?

java - Spring 数据休息 : Return Resources of User

java - Spring单例被调用两次

javascript - 在 Angular 6+ 中,如何用图标替换 <p-dataTable> 和 <p-column> 标记中的值?

angular - Cypress 中的 'ng' 是什么

spring-mvc - Spring 数据休息: Entity serialization with LAZY object cause JsonMappingException

spring - 使用 Spring 数据休息发布嵌套对象?

spring - 预授权不起作用