Results 1 to 3 of 3

Thread: In my Spring Project BeanFactory and XmlBeanFactory classes are not resolved

Threaded View

  1. #1
    Join Date
    Jun 2006
    Location
    colombo, Sri Lanka
    Posts
    19

    Default 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
  •