Springs Element 'beans' cannot have character [children], because the type's content type is element-only

前端 未结 14 1622
北恋
北恋 2021-02-18 13:17

I search some page in stackoverflow to solve this problem, did follow some true answer but not working. I am new in spring , sorry. here is my dispatcher-servlet



        
相关标签:
14条回答
  • 2021-02-18 13:41

    Noticed in the your dispatcher-servlet.xml file you are missing "<?xml version="1.0" encoding="UTF-8"?>".

    Please add it to top of file and re-run. Let me know if it doesn't work.

    0 讨论(0)
  • 2021-02-18 13:42

    I got the same problem, but after looking at the code closely, I found that my IDE was showing the error mark on the wrong line of code while the problem was arising because of an extra angular-bracket.

    0 讨论(0)
  • 2021-02-18 13:42

    manually check whether there are unnecessary spaces tabs before each nodes, you can do with eclipse

    regards

    0 讨论(0)
  • 2021-02-18 13:46

    Yes, i experience thesame problem. I solved it by first: format the xml. Then i took a keen look through the lines, i found an extra closing tag (/>) which have been blocking the closing tag from seeing the open tag. So i removed the bug (/>) and the program deployed.

    0 讨论(0)
  • 2021-02-18 13:46

    The problem was an uncommented line in the springsecurity.xml which was missing when I commented the whole file and uncommented. Make sure you have the extra text commented or remove them.

    0 讨论(0)
  • 2021-02-18 13:48

    Unfortunately mine was a simple mistake I type a '.' character in the middle.

    Solved by just removing the '.' - so will get this type of error if any unused and unknown character is present in the configuration file.

    0 讨论(0)
提交回复
热议问题