• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem In Import Spring 3 Library

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Rahul Bhalla
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
copying the sources into the lib folder you need the classes
Thanks for solving my problem
 
reply
    Bookmark Topic Watch Topic
  • New Topic