I'm upgrading my app from 1.4 to 1.5, and I'm trying to add in Annotations. I saw that 2.1 M2 had @autowired and @Resources, so I was going to try to use them.
Right now I'm only trying out @autowired. I can't seem to get the compiler to recognize @Resources. That's another issue that I'll tackle after this.
In the reference manual (p.85, section 3.10), it says to set up the context XML like so:
When I tried to start the app I get this error:Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.1.xsd"> <context:annotation-config/> </beans>
I went to my browser and put in the xsd and it came up fine. Does anyone have any ideas?Code:org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/spring-context-2.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.


Reply With Quote
...