-
Oct 27th, 2010, 11:56 AM
#1
Need Help
I am trying to run sample code from Spring In Action Second Edition on SpringSource-tool-suite version 2.3.2. After importing a project, I get "import org.springframework cannot resolve" error for the following import statements:
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlAp plicationContext;
Do I have to do more setup after using the installer?
How do I get rid of this error?
-
Oct 28th, 2010, 08:07 AM
#2
...
Good research. lol.
I am also this kind of noob who got this error. And i thought:
SpringSource Tool Suite should include the SpringFramework. I can't find it to include it into the Project under the JavaBuildPath.
I refuse to download the SpringFramework. If i make a Spring Project it should already be included.
regards
C00n
-
Oct 28th, 2010, 08:24 AM
#3
The wtf solution.
1) Download the spring-framework.
2) Go to Project Properties.
3) Build-Path.
4) Add external jar.
3) Include the jar-files that you downloaded in to the build-path.
It worx now.
-
Nov 11th, 2010, 10:45 PM
#4
STS comes with Maven plugin so if the project has a pom file (.pom) you can do right click on the project >> maven >> enable dependency management.
If you have an internet connection and the pom is correct then it should automatically download and bring in all the dependencies that are declared in the pom file which should be the ones that the project needs....
That is of course if the project is a maven project >> has a pom file
If not, you can do as C00n stated. The book should tell you which dependencies you need then you can download them and add them manually to your classpath.
-
Dec 12th, 2011, 09:33 AM
#5
This is the only way?
Is this the only solution (with a non-maven project), even if the jars are in the sts plugin directory? I'm encountering the same problem and figured sts would have all that configured for spring projects. I'm using sts 2.8.1.RELEASE.
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