Illegal escape character in string literal

The Illegal escape character in string literal error occurred when using spring MVC pattern to write action. It was found that “\” was used as the path separator, such as “Index\ Index “. When using this slash, another \ escape should be added in front of it. “/” is recommended as the separator or file.separator; \ “is best avoided.

Read More: