aspose file tools*
The moose likes Spring and the fly likes Problem In Import Spring 3 Library Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Problem In Import Spring 3 Library " Watch "Problem In Import Spring 3 Library " New topic
Author

Problem In Import Spring 3 Library

Rahul Bhalla
Greenhorn

Joined: Jan 28, 2012
Posts: 17
Hi
Today I start Learning Spring3 and tried to build a hello spring program for that [b] I start using STS(Spring tool Suite) as IDE and library which i paste under lib folder under web content is [/b]
org.springframework.web-sources-3.1.2.RELEASE,
org.springframework.web.servlet-sources-3.1.2.RELEASE
org.springframework.expression-sources-3.1.2.RELEASE
org.springframework.core-sources-3.1.2.RELEASE
org.springframework.context.support-sources-3.1.2.RELEASE
org.springframework.beans-sources-3.1.2.RELEASE
org.springframework.asm-sources-3.1.2.RELEASE
jstl-1.2
commons-logging-1.1.1

.[b]but i found give error[/b]
"The import org.springframework.stereotype.Controller cannot be resolved"
"The import org.springframework.web.servlet.ModelAndView cannot be resolved"
"The import org.springframework.web.bind.annotation.RequestMapping cannot be resolved".


please Suggest me what is wrong ???
Thanks for your Consideration
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1666
    
    7

Rahul Bhalla wrote:which i paste under lib folder under web content is


Don't do that. You will want to use Maven (or Gradle) to build your applications and handle your dependency management. Spring brings in like 50 libraries not even counting transitive dependencies. It is not a light dependency graph, it is essential for this reason that you use a something like Maven or you will be working way to hard to get things running. Also you were copying the sources into the lib folder you need the classes, the sources are only used if you want to build Spring itself which I am sure is not your intention.

My suggestion if you are using STS is to start with the template project. Go to File -> new Spring Template Project -> Spring MVC Project.

This will create a sample spring project. You can build it by right clicking the project and saying run as -> Maven Install


[How To Ask Questions][Read before you PM me]
Rahul Bhalla
Greenhorn

Joined: Jan 28, 2012
Posts: 17
copying the sources into the lib folder you need the classes
Thanks for solving my problem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem In Import Spring 3 Library