I am building a service using Spring MVC set up using Spring Boot where I want to be able to have arbitrary unicode characters in the URLs.
By looking around the web I e
Following the event of a brain-wave, adding the bean method
@Bean
public EmbeddedServletContainerFactory servletContainer() {
TomcatEmbeddedServletContainerFactory factory = new TomcatEmbeddedServletContainerFactory(8080);
factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
@Override
public void customize(Connector connector) {
connector.setURIEncoding("UTF-8");
}
});
return factory;
}
seems to solve the problem.
Edit
The CharacterEncodingFilter
is still necessary for converting POST bodies.