IntelliJ IDEA validates toward wrong XSD

前端 未结 2 827
一向
一向 2021-01-03 09:37

I have defined the following transaction manager:

    

and

2条回答
  •  日久生厌
    2021-01-03 10:22

    If you open up the jar file that the schemaLocation should point to the xsd according to this screen shot:

    enter image description here

    Then you'll see that IntelliJ has a bunch of xsd files for different versions of Spring:

    enter image description here

    This means that you really have all the schemas you need.

    If your bean definitions file has problems then your schemaLocation must point to the wrong version in the Spring jar file:

    enter image description here

    Check the Settings | Schemas and DTDs and verify that you haven't accidentally manually set it to point to the wrong xsd file:

    enter image description here enter image description here

    If it is wrong then you'll have to remove that line using the minus sign. This will cause IntelliJ to go back to it's default values:

    enter image description here

    After that you should be seeing the same thing as in the first screen shot.

提交回复
热议问题