E:\JavaWorkings\SpringWorkouts\Xml-Beaninjection\src\Main.java
E:\JavaWorkings\SpringWorkouts\Xml-Beaninjection\src\Inject.java
E:\JavaWorkings\SpringWorkouts\Xml-Beaninjection\src\context.xml
<?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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="mybean"
class="Inject"
p:name="Girish"
p:age="24"
p:address="Noida"
p:company="Roseindia.net"
p:email="girish@roseindia.net"/>
</beans>
---------------
run:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [context.xml]; nested exception is java.io.FileNotFoundException: class path resource [context.xml] cannot be opened because it does not exist
java.io.FileNotFoundException: class path resource [context.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:167)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:73)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61)
at xmlbeaninjection.Main.main(Main.java:22)
BUILD SUCCESSFUL (total time: 0 seconds)