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]
.[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
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