I have defined the following transaction manager:
and
If you open up the jar file that the schemaLocation
should point to the xsd according to this screen shot:
Then you'll see that IntelliJ has a bunch of xsd files for different versions of Spring:
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:
Check the Settings | Schemas and DTDs
and verify that you haven't accidentally manually set it to point to the wrong xsd file:
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:
After that you should be seeing the same thing as in the first screen shot.
I was having a similar problem trying to use spring security and beans in the same xml config. IntelliJ was insisting on validating using the security xsd version 2.0 despite everything telling it to use version 3.1.
I was able get IntelliJ to figure it out by changing the default namespace between security and beans.
I originally had:
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
So I switched it to:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
After that IntelliJ was validating using the correct xsd. I'm not sure if this was a bug with IntelliJ or something I was doing wrong, but it works now.
Hopefully this helps someone in the future.