There is a Zuul application that is being run by Spring-boot-2.1.4.RELEASE.
When I request as http://192.168.10.84:8080/app/rest/micro1/inquiry/printCarInquiryList/1?param={%22storeHouseId%22:%22%22,%22storeHouseName%22:%22%22,%22storeHouseType%22:%22%22,%22plaqueSeries%22:%22%22,%22productionYearFrom%22:%22-1%22,%22productionYearTo%22:%22-1%22,%22overallInquery%22:false,%22edited%22:false,%22confirmerCount%22:%22-1%22,%22reportStoreHouseType%22:%22-1%22,%22plaqueNumber%22:%22%22,%22motorNumber%22:%22%22,%22motorNumberOperator%22:%227%22,%22chassisNumber%22:%22%22,%22chassisNumberOperator%22:%227%22,%22storeHouseShowType%22:%221%22,%22havePlaque%22:%22-1%22,%22isFilterByStoreHouseStatus%22:true,%22storeHouseList%22:[%221518691%22],%22goodsStatus%22:null,%22statusId%22:%22-1%22,%22goodsDeleted%22:null,%22formType%22:1,%22searchFilter%22:%22%22,%22order%22:%22%20e.samapelItem.id%20%22,%22pageNumber%22:0,%22pageSize%22:%227%22,%22plaqueType%22:%22-1%22}
the following exception is raised:
Caused by: java.net.URISyntaxException: Illegal character in query at index 95: http://192.168.10.84:8080/app/rest/micro1/inquiry/printCarInquiryList/1?param={%id%22:%22%22,%22storeHouseName%22:%22%22,%22storeHouseType%22:%22%22,%22plaqueSeries%22:%22%22,%22productionYearFrom%22:%22-1%22,%22productionYearTo%22:%22-1%22,%22overallInquery%22:false,%22edited%22:false,%22confirmerCount%22:%22-1%22,%22reportStoreHouseType%22:%22-1%22,%22plaqueNumber%22:%22%22,%22motorNumber%22:%22%22,%22motorNumberOperator%22:%227%22,%22chassisNumber%22:%22%22,%22chassisNumberOperator%22:%227%22,%22storeHouseShowType%22:%221%22,%22havePlaque%22:%22-1%22,%22isFilterByStoreHouseStatus%22:true,%22storeHouseList%22:[%221518691%22],%22goodsStatus%22:null,%22statusId%22:%22-1%22,%22goodsDeleted%22:null,%22formType%22:1,%22searchFilter%22:%22%22,%22order%22:%22%20e.samapelItem.id%20%22,%22pageNumber%22:0,%22pageSize%22:%227%22,%22plaqueType%22:%22-1%22} at java.net.URI$Parser.fail(URI.java:2848) ~[na:1.8.0_181] at java.net.URI$Parser.checkChars(URI.java:3021) ~[na:1.8.0_181] at java.net.URI$Parser.parseHierarchical(URI.java:3111) ~[na:1.8.0_181] at java.net.URI$Parser.parse(URI.java:3053) ~[na:1.8.0_181] at java.net.URI.(URI.java:588) ~[na:1.8.0_181] at java.net.URI.create(URI.java:850) ~[na:1.8.0_181]
whereas there is the following configuration:
@Bean
public ConfigurableServletWebServerFactory webServerFactory() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
@Override
public void customize(Connector connector) {
connector.setProperty("relaxedQueryChars", "|{}[]");
}
});
return factory;
}
where is wrong?
relaxedQueryChars
has no effect on what characters are accepted byURI.create
. It'sURI.create
that's failing. It looks to me like you haven't encoded your URI correctly. – Andy Wilkinsonhttp://192.168.10.84:8080/app/rest/micro1/inquiry/printCarInquiryList/1?param={id:1}
, again same exception is raised, the problem is character{
– reza ramezani matin