-
Jun 2nd, 2007, 12:58 AM
#1
In my Spring Project BeanFactory and XmlBeanFactory classes are not resolved
Hi All,
I manged to install SpringIDE 2.0.0.v200705150600 and WST 1.5.4 using Eclipse Callisto and http://springide.org/updatesite_dev/ site on JDK 5. Its installed correctly. Then I created a new Spring Project and add my bean classes and bean config file. Then I added my simple client file as follows. However my project can not resolve BeanFactory and XmlBeanFactory classes. They should come with the spring.jar. I thought Spring IDE plugin automatically add that jar to my project. I can build my project only if I manually add the spring.jar from springframework2.xx_HOME/dist/spring.jar.
Is it because somthing wrong with Spring IDE or have I missed configuring somthing. I expect spring IDE to add this jar without me configuring it which is pretty bad
Can some one clarify this.
Thanks,
Nalaka
import org.springframework.core.io.FileSystemResource;;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFacto ry;
public class HelloApp {
public static void main(String[] args) throws Exception {
BeanFactory factory = new XmlBeanFactory(new FileSystemResource("hello.xml"))
GreetingService greetingService = (GreetingService) factory.getBean("greetingService");
greetingService.sayGreeting();
}
}
Last edited by nalaka; Jun 2nd, 2007 at 01:33 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules