今天在学习java web中的Filter的时候在配置xml文件的报了一个错误:
Multiple annotations found at this line:
- <?xml version="1.0" encoding="UTF-8"?>
- The processing instruction target matching "[xX][mM][lL]" is not
allowed.
然后找了一下问题所在,报错原因是因为在xml的第一行前面
<?xml version="1.0" encoding="UTF-8"?>
多了一个空格(可能是不小心按了空格),把空格删掉就可以了
解决方法:
将第一行前面的空格删掉即可